* Possible bug with git-rebase and post-rewrite hook
@ 2015-03-05 13:55 Francis Moreau
2015-03-05 14:05 ` Francis Moreau
0 siblings, 1 reply; 2+ messages in thread
From: Francis Moreau @ 2015-03-05 13:55 UTC (permalink / raw)
To: Git Mailing List
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Possible bug with git-rebase and post-rewrite hook
2015-03-05 13:55 Possible bug with git-rebase and post-rewrite hook Francis Moreau
@ 2015-03-05 14:05 ` Francis Moreau
0 siblings, 0 replies; 2+ messages in thread
From: Francis Moreau @ 2015-03-05 14:05 UTC (permalink / raw)
To: Git Mailing List
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.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-05 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 13:55 Possible bug with git-rebase and post-rewrite hook Francis Moreau
2015-03-05 14:05 ` Francis Moreau
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).