git rebase --interactive problems
When I try to do even the simplest rebase --interactive, I get a cryptic error message:
$ git rebase -i HEAD~2 <do nothing in the editor that appears, just save>
I then get:
/usr/lib/git-core/git-rebase--interactive: 1: arithmetic expression:
expecting primary: "-c ^[^#]
2+-c ^[^#]
0"
and all I can do is git rebase --abort
Am I doing something wrong, or is this a bug? I am using git 1.6.4.2
thanks
Dave
It looks like something is going wrong with the 'grep -c' in
mark_action_done () {
sed -e 1q < "$TODO" >> "$DONE"
sed -e 1d < "$TODO" >> "$TODO".new
mv -f "$TODO".new "$TODO"
count=$(grep -c '^[^#]' < "$DONE")
total=$(($count+$(grep -c '^[^#]' < "$TODO")))
if test "$last_count" != "$count"
then
last_count=$count
printf "Rebasing (%d/%d)\r" $count $total
test -z "$VERBOSE" || echo
fi
}are you using an unusual platform or have an unusual /bin/grep or /bin/sh?
Jeff
Quoted 2 lines · Dave Rodgman
Am I doing something wrong, or is this a bug? I am using git 1.6.4.2
can you do before running the rebase (assuming a bourne shell) :
unset GREP_OPTIONS
this looks like the bug I just send a patch to the list to fix and which seems to be also reported in Ubuntu as :
https://bugs.launchpad.net/ubuntu/+source/git-core/+bug/398393
Carlo