sporadic git failures on interactive rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

(git version 2.2.0)

I am currently developing/testing a script for a "history surgery" on a quite big repository (~30000 commits). The script always runs against exactly the same copy of a git repository. So things should be reproducable, but sometimes i get failures for the following sequence of commands:  

$ git checkout some_branch
$ GIT_SEQUENCE_EDITOR="sed -i '1s/^pick /edit /'" git rebase -i $MERGETARGET~1
$ git rm -rf some_files
$ git commit --amend --no-edit -c $MERGETARGET
$ git rebase --continue

(where MERGETARGET is a valid commit id in the history of some_branch)

Here is an example output where things went wrong (MERGETARGET is 6185ac39299a740dc9bc6c5906dd1f229b3f046b). The interesting parts are the messages "c4095c1: not a commit that can be picked" and "error: short SHA1 c4095c1 is ambiguous.":

. Switched to branch 'master-flat'
. c4095c1: not a commit that can be picked
. 80f99bd: not a commit that can be picked
. Stopped at 6185ac39299a740dc9bc6c5906dd1f229b3f046b... some_comment
. You can amend the commit now, with
. 
.         git commit --amend
. 
. Once you are satisfied with your changes, run
. 
.         git rebase --continue
. rm 'some_files'
. [detached HEAD 56675a06316345ac121997dde2b9eddb649d0539] some_comment
.  Author: user <foo.bar@xxxxxxx>
.  Date: Wed Sep 26 09:11:17 2012 +0000
. [more info about that commit]
. error: short SHA1 c4095c1 is ambiguous.
. fatal: Needed a single revision
. Invalid commit name: c4095c1

Now that the command failed, i checked for ambigous c4095c1. But there is only one:
$ git log -1 c4095c1
. commit c4095c1f5e7c126accf93ba68e2fa72bb055f567
. ...

Just as a test:
$ git log -1 c409
. error: short SHA1 c409 is ambiguous.
. error: short SHA1 c409 is ambiguous.

As i said above this issue is not strictly reproducable. I have a full backup of the working dir including the .git folder from just before the command sequence above. If i rollback and execute the commands again, everything works fine. Up to now i didn't had the situation the the sequence failed twice two in a row.

I also have the backup of the directory from directly after the sequence failure. So i can still test some commands if you need more information.

Does anybody have an idea of what's going on here?

Best regards
Henning


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]