From: Junio C Hamano Date: Fri, 02 Oct 2026 01:28:09 GMT Subject: Re: [RFC] Preserve per-file historical mtimes from Git history Message-ID: In-Reply-To: <011ad911-2d62-4179-b3a7-e14aab79f18a@gmx.com> "Artem S. Tashkinov" 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.