From: Andreas Schwab <schwab@linux-m68k.org>
To: Philippe Vaucher <philippe.vaucher@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Equivalent of "fixup" for git filter-branch
Date: Fri, 11 May 2012 14:51:58 +0200 [thread overview]
Message-ID: <m2havmop75.fsf@igel.home> (raw)
In-Reply-To: <CAGK7Mr7qdTwfha8aUdXE4FeXjA0rW3JL0q=a9kHArirjv5bygg@mail.gmail.com> (Philippe Vaucher's message of "Fri, 11 May 2012 14:32:08 +0200")
Philippe Vaucher <philippe.vaucher@gmail.com> writes:
>>
>> > I know there is `skip_commit` for git filter branch with
>> > --commit-filter which squash the current commit with the next one,
>> > however I have trouble finding a "fixup" equivalent that'd squash the
>> > commit with the previous one (just like git rebase -i allows).
>>
>> Probably doable with an index filter that updates the index for the
>> parent commit with the contents of the fixup commit and a commit filter
>> that skips the fixup commit.
>
>
> Hum, I'm unsure about how this would look... can I use "git commit --amend"
> inside a commit-filter?
I don't think that will work if the amended commit has more than one
children, since the result won't be reflected in the map function.
> Also, how can I know in advance that the next commit will be a fixup commit?
In the index filter, when $GIT_COMMIT equals the parent of the fixup
commit, update the index with git read-tree from the fixup commit.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2012-05-11 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 16:30 Equivalent of "fixup" for git filter-branch Philippe Vaucher
2012-05-10 17:39 ` Andreas Schwab
[not found] ` <CAGK7Mr7qdTwfha8aUdXE4FeXjA0rW3JL0q=a9kHArirjv5bygg@mail.gmail.com>
2012-05-11 12:51 ` Philippe Vaucher
2012-05-11 12:51 ` Andreas Schwab [this message]
2012-05-11 13:04 ` Philippe Vaucher
2012-05-11 13:45 ` Andreas Schwab
2012-05-12 12:12 ` Philippe Vaucher
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=m2havmop75.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=git@vger.kernel.org \
--cc=philippe.vaucher@gmail.com \
/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).