Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: Git Interactive Rebase - Bug in error message ?

From: Matthieu Tourne <hidden>
Date: 2016-06-15 22:48:55

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help