From: Francis Moreau <francis.moro@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: Possible bug with git-rebase and post-rewrite hook
Date: Thu, 05 Mar 2015 15:05:44 +0100 [thread overview]
Message-ID: <54F862B8.2040901@gmail.com> (raw)
In-Reply-To: <54F86040.8060205@gmail.com>
oops, I forgot to say that this happen with git 2.3.1.
On 03/05/2015 02:55 PM, Francis Moreau wrote:
> 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.
>
prev parent reply other threads:[~2015-03-05 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 13:55 Possible bug with git-rebase and post-rewrite hook Francis Moreau
2015-03-05 14:05 ` Francis Moreau [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=54F862B8.2040901@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).