From: Francis Moreau <francis.moro@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Possible bug with git-rebase and post-rewrite hook
Date: Thu, 05 Mar 2015 14:55:12 +0100 [thread overview]
Message-ID: <54F86040.8060205@gmail.com> (raw)
Hi,
I have a suspect case which happens when rebasing a branch.
I'm using the post-rewrite hook and during certain circumstance, my hook
is called by git-rebase with wrong parameters: <old-sha1> argument is
not related to <new-sha1> one.
This actually happens when git-rebase stops and reports:
The previous cherry-pick is now empty, possibly due to conflict
resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git reset'
rebase in progress; onto 2889531
You are currently rebasing branch 'foo' on '2889531'.
If I decide to skip it by doing 'git rebase --continue' then I get the
issue when my hook is run.
BTW, I find that the message is not really clear since it tells me to
run 'git-reset' in the case I want to ignore this empty commit. I'm not
sure that 'git-reset' is really helping in that case (my index is clean)
but 'git rebase --continue' would have been more appropriate IMHO.
If I do 'git commit --allow-empty' then there's no issue when the hook
is run.
Thanks.
next reply other threads:[~2015-03-05 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 13:55 Francis Moreau [this message]
2015-03-05 14:05 ` Possible bug with git-rebase and post-rewrite hook Francis Moreau
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=54F86040.8060205@gmail.com \
--to=francis.moro@gmail.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;
as well as URLs for NNTP newsgroup(s).