From: Junio C Hamano <gitster@pobox.com>
To: Marc Branchaud <marcnarc@xiplink.com>
Cc: Johannes Sixt <j6t@kdbg.org>,
Phillip Wood <phillip.wood123@gmail.com>,
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>,
phillip.wood@dunelm.org.uk, git@vger.kernel.org
Subject: Re: using oldest date when squashing commits
Date: Sat, 28 Oct 2023 08:24:53 +0900 [thread overview]
Message-ID: <xmqqlebnodh6.fsf@gitster.g> (raw)
In-Reply-To: <70b8d4d8-f4b5-4cd7-b73a-1d7393d84266@xiplink.com> (Marc Branchaud's message of "Fri, 27 Oct 2023 08:34:40 -0400")
Marc Branchaud <marcnarc@xiplink.com> writes:
> I never use "fixup -C" (or -c), but I do use squash/fixup a lot. I
> find that I would prefer it if Git used the most recent Author date
> from the set of commits being combined, rather than preserving the
> picked commit's Author date. Sometimes it takes quite a while for me
> to get a piece of work sorted out, and I would rather have the Author
> date in the end-result commit reflect the work's completion time than
> its initiation time.
Yeah, I can sympathize but with both positions, as I can see why
most people would want "minor fixups and typofixes" to retain the
original authorship date, and when concluding a "combining the whole
steps together to reach this final single patch" development, they
would want to record the completion date. The "take the one's
authorship and apply only the effects and not metadata from the
fixups" is a good match for the former. To support the latter, we
can just ignore the timestamp of any commits that were involved in
the end result, and record the time "rebase -i" was concluded
instead, but the tool is not set up for doing so.
> The current behaviour means that when scanning through commits with
> tools like gitk (which shows just the Author date in its list of
> commits) I'll often see what I feel are inaccurate or confusing dates
> there,...
Yup, exactly. Two opposing worldviews, which is not even per-user,
but depends on why the "fixup/squash" was used, exists, but the tool
was designed to support the "small fixup for work that was mostly
done already" use case, so the other usecase is left for people to
say "Yes, I know how to force my desired author date on commits,
thanks." ;-)
> Anyway, this is a minor itch for me that I've never felt the need to
> scratch. I just thought I'd mention it since the topic is being
> discussed.
Yup, it is a very good observation. Giving it a good UI to support
both worldviews would be a good exercise, as we all need both
behaviour from time to time.
Thanks.
prev parent reply other threads:[~2023-10-27 23:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-19 12:48 using oldest date when squashing commits Oswald Buddenhagen
2022-03-20 8:05 ` Johannes Sixt
2022-03-20 10:53 ` Oswald Buddenhagen
2023-10-24 9:26 ` Phillip Wood
2023-10-24 10:18 ` Oswald Buddenhagen
2023-10-24 14:00 ` Phillip Wood
2023-10-24 17:30 ` Junio C Hamano
2023-10-24 20:13 ` Oswald Buddenhagen
2023-10-24 21:19 ` Johannes Sixt
2023-10-27 12:34 ` Marc Branchaud
2023-10-27 12:45 ` Oswald Buddenhagen
2023-10-27 13:20 ` Marc Branchaud
2023-10-27 13:26 ` Oswald Buddenhagen
2023-10-27 13:46 ` Marc Branchaud
2023-10-27 23:24 ` 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=xmqqlebnodh6.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=marcnarc@xiplink.com \
--cc=oswald.buddenhagen@gmx.de \
--cc=phillip.wood123@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).