From: Junio C Hamano <gitster@pobox.com>
To: "Artem S. Tashkinov" <aros@gmx.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Preserve per-file historical mtimes from Git history
Date: Thu, 01 Oct 2026 18:28:09 -0700 [thread overview]
Message-ID: <xmqqqzi83n86.fsf@gitster.g> (raw)
In-Reply-To: <011ad911-2d62-4179-b3a7-e14aab79f18a@gmx.com> (Artem S. Tashkinov's message of "Thu, 1 Oct 2026 09:43:25 +0000")
"Artem S. Tashkinov" <aros@gmx.com> writes:
Omitting parts and details that are not interesting (to me) from the
list.
> 3. How should rename following behave across complicated/non-linear
> history?
You'd also want to think about what should happen when somebody
concatenates two files to create one. No new contents are
introduced to the tree.
As to the definition of the historical times, I would find it a lot
more natural if they behaved as if you did this:
* Prepare "git rev-list --first-parent --reverse HEAD" to prepare
a list of commits that historically appeared at the tip of the
trunk.
* Make a checkout of the first commit in the list; give all the
working tree files the committer timestamp of that commit.
* Repeatedly run "git checkout" of the next commit, which should
replace the paths that differ from the previous commit. Give
these paths the committer timestamp of the current commit.
Repeat this process until you run out of the list.
and then looked at timestamp of each surviving paths in the working
tree.
> 5. Would it make sense for `git archive` to optionally use these
> historical per-file timestamps for archive members?
Yes, it would be interesting to teach "git archive" to produce a
tarball with these synthesized timestamps.
prev parent reply other threads:[~2026-10-02 1:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 9:43 [RFC] Preserve per-file historical mtimes from Git history Artem S. Tashkinov
2026-10-02 1:28 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqqzi83n86.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=aros@gmx.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox