Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix sync

  • Loading branch information...
commit aeb7e8c72613ec46ce596100200e596c8f3b8fcd 1 parent 142f547
@orefalo authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 cmds/g2-g2isforced.sh
View
6 cmds/g2-g2isforced.sh
@@ -1,6 +1,6 @@
#!/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
@@ -8,6 +8,6 @@ remote=$1
[[ -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
Please sign in to comment.
Something went wrong with that request. Please try again.