From: Fabian Stelzer <fs@gigacodes.de>
To: "Glen Choo" <chooglen@google.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Carlo Arenas <carenas@gmail.com>,
Aidan Gallagher <aidgal2@gmail.com>,
git@vger.kernel.org
Subject: Re: Feature Request: `git commit --amend-to`
Date: Thu, 30 Sep 2021 10:05:13 +0200 [thread overview]
Message-ID: <435d33d0-8991-d8c5-85b0-928ec97310c6@gigacodes.de> (raw)
In-Reply-To: <kl6lwnmzpbhq.fsf@chooglen-macbookpro.roam.corp.google.com>
On 29.09.21 18:55, Glen Choo wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>>> [...] I think the problem
>>> has more to do with how Git manages merges and conflicts and less to do
>>> with having shortcuts in the CLI.
>>
>> I think that users who'd like an --amend-to would probably be happy with
>> or might want to try out something like "hg absorb", which is something
>> I think we should have stolen in git already, but it's never too late.
>
> Agree. I think some "hg absorb" features get at the heart of what I
> meant, which is that users would benefit from making this merge conflict
> resolution a lot simpler.
>
I have never used hg absorb but after reading about its concepts i think
it best maps to something like git automatically creating fixup commits
for you. I also found https://github.com/tummychow/git-absorb (also
untested by me) which claims to do exactly this.
Something like having "git commit -a --fixup" (without any commit hash)
create matching fixup commits for all changes i made would already be
quite cool.
From what i see from our corporate environments and github/bitbucket
workflows though i think most users never even heard about fixup commits
or ever did an interactive rebase (this is totally a view from my
corporate bubble and might not really represent the average git userbase).
Most code review workflows i see don't focus on individual commits and
only present the complete final patch (some at least allow you to view
individual commits but not much more) and therefore users have no big
incentive during review to shape their changes into proper commits.
Some tools (like phabricator) even squash the final patch into a single
commit by default which i think is a good idea if single commits are of
no concern during review anyway.
I wonder if something like an easy to use "absorb" feature (without
fixups, rebases) might encourage and produce more clean commit histories
even for the mentioned workflows.
next prev parent reply other threads:[~2021-09-30 8:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAENgTz2DoStQEqoKYKa-qMcyaez64u55mnv1HHOzDm392fuEqQ@mail.gmail.com>
2021-09-24 16:04 ` Feature Request: `git commit --amend-to` Aidan Gallagher
2021-09-24 17:15 ` Carlo Arenas
2021-09-28 16:52 ` Glen Choo
2021-09-28 19:54 ` Ævar Arnfjörð Bjarmason
2021-09-29 16:55 ` Glen Choo
2021-09-30 8:05 ` Fabian Stelzer [this message]
2021-09-30 13:56 ` Phillip Wood
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=435d33d0-8991-d8c5-85b0-928ec97310c6@gigacodes.de \
--to=fs@gigacodes.de \
--cc=aidgal2@gmail.com \
--cc=avarab@gmail.com \
--cc=carenas@gmail.com \
--cc=chooglen@google.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).