Permalink
Browse files

fix sync

  • Loading branch information...
orefalo committed Mar 5, 2013
1 parent 142f547 commit aeb7e8c72613ec46ce596100200e596c8f3b8fcd
Showing with 3 additions and 3 deletions.
  1. +3 −3 cmds/g2-g2isforced.sh
View
@@ -1,13 +1,13 @@
#!/bin/bash
#
-# returns 1 if the given branch was force updated, 0 if not
+# returns 0 if the given branch was force updated, 1 if not
# if no parameters, figures the upstream branch from the tracking table
remote=$1
[[ -z $1 ]] && remote=$("$GIT_EXE" g2getremote)
[[ -n $remote ]] && {
hash=$("$GIT_EXE" reflog $remote | head -1 | grep forced-update | cut -f 1 -d " ")
branch=$("$GIT_EXE" branch | grep "*" | sed "s/* //")
- [[ -n $hash && $("$GIT_EXE" reflog $branch | grep $hash | grep -c reset) -eq 0 ]] && exit 1
+ [[ -n $hash && $("$GIT_EXE" reflog $branch | grep $hash | grep -c reset) -eq 0 ]] && exit 0
}
-exit 0
+exit 1

0 comments on commit aeb7e8c

Please sign in to comment.