charleso/git-cc — Issue #13: rebase error, appears to be skipping a necessary commit step
Author: kiates
Created: 2012-03-02 23:41:02+00:00
State: open

I've been experimenting with gitcc and ran into the following exception.

$ gitcc rebase
> git ls-files --modified
> git log -n 1 --pretty=format:%ai master_cc
> cleartool lsh -fmt %o%m|%Nd|%u|%En|%Vn|%Nc\n -recurse -since 28-Feb-2012.20:07:03 .
> git branch
> git checkout master_cc
> cleartool get -to "file1.xml"
> git add -f "file2.xml"
> cleartool get -to "file2.xml" "file2.xml"
> git add -f "file2.xml"
> git add .gitcc
> git rebase master_ci master_cc
Traceback (most recent call last):
File "e:/gitwork/git-cc-dload/gitcc", line 48, in
main()
File "e:/gitwork/git-cc-dload/gitcc", line 14, in main
return invoke(cmd, args)
File "e:/gitwork/git-cc-dload/gitcc", line 38, in invoke
cmd.main(*args)
File "e:\gitwork\git-cc-dload\rebase.py", line 52, in main
doStash(lambda: doCommit(cs), stash)
File "e:\gitwork\git-cc-dload\common.py", line 38, in doStash
f()
File "e:\gitwork\git-cc-dload\rebase.py", line 52, in
doStash(lambda: doCommit(cs), stash)
File "e:\gitwork\git-cc-dload\rebase.py", line 66, in doCommit
git_exec(['rebase', CI_TAG, CC_TAG])
File "e:\gitwork\git-cc-dload\common.py", line 47, in git_exec
return popen('git', cmd, GIT_DIR, **args)
File "e:\gitwork\git-cc-dload\common.py", line 60, in popen
raise Exception((stderr + stdout).decode(ENCODING))
Exception: Cannot rebase: Your index contains uncommitted changes.
Please commit or stash them.

In a normal gitcc rebase command after performing "git add .gitcc" it would do a "git commit -m "message" then a "git rebase master_ci master_cc" and so one. In this case it is skipping the commit resulting in the index having the files represented by file1.xml and file2.xml staged but not committed.

The index and working set was clean prior to running "gitcc rebase"

Thanks for any help or insight you might have.
I'm not a python developer or I would probably try and debug it.