Re: Git Interactive Rebase - Bug in error message ?
- From
- Matthieu Tourne <matthieu.tourne@gmail.com>
- Date
- Jun 8, 2010, 00:06 UTC
- Message-ID
- <AANLkTinaUiHz8gRi5JF3n45aNCoPqiNxwExIga-cyYnw@mail.gmail.com>
- In-Reply-To
- <AANLkTikIKILZaGC9WZ45ZUC-lxeYIb3Mrf38qwlS2bVr@mail.gmail.com>
Hi,
I tried to perform an interactive rebase of several commits in my tree. In one of my commits I had performed a git rm --cached, on several files. The resulting message was :
error: Untracked working tree file 'foo' would be overwritten by merge. shift: 1: can't shift that many
I eventually removed the file from the fs, and the rebase worked. The fact that the rebase is not working is probably not a bug, but the last line looks like an sh bug.
I can reproduce this with git 1.7.1, and also git HEAD (1.7.1.245.g7c42e)
this can be reproduced with :
$ mkdir dirA $ echo "A" > dirA/A $ git commit -a -m 'first commit'
$ mkdir dirB $ echo "B" > dirB/B $ git commit -a -m 'creating dirB'
$ mkdir dirC $ echo "C" > dirC/C $ git rm -r --cached dirA $ git commit -a -m 'creating dirC, removing dirA'
$ git rebase --interactive HEAD~2 (then swapping the two commits)
pick creating dirC, removing dirA pick creating dirB
error: Untracked working tree file 'dirA/A' would be overwritten by merge. shift: 1: can't shift that many
Thank you,
Matthieu.
-- Matthieu Tourne