Bug in git citool when staging symlink as replacement for submodule
- From
Adam Spiers <git@adamspiers.org>
- Date
- Jun 1, 2012, 10:31 UTC
- Message-ID
- <CAOkDyE9q1n=oLoEXXxurDjNM0B2+cZ9eoeGE57F9hEQUjK0hZg@mail.gmail.com>
I found some strange behaviour in git citool when trying to stage a symlink into the index as a replacement for a (non-registered) submodule. I just reproduced with latest master (1.7.11.rc0.55.gb2478aa):
mkdir repo
cd repo
git init
echo foo > one
git add one
git commit -m'first commit' mkdir two
cd two
git init
echo foo > submodule-file
git add submodule-file
git commit -m'first submodule commit'cd ..
git add two
git commit -m'second commit' rm -rf two
ln -s one twogit citool
At this point, git citool outputs:
error: Unhandled submodule diff marker: {@@ }
error: Unhandled submodule diff marker: {+on}Now if I press Control-T to try to stage 'two' into the index, I get a new dialog which says:
Updating the Git index failed. A rescan will be automatically
started to resynchronize git-gui. error: two is already a gitlink, not replacing
fatal: Unable to process path two[Unlock Index] [Continue]
I can work around via 'git add two', but it would be nice if citool handled this correctly.
Thanks! Adam