Code

Bash completion support for aliases
[git.git] / git-cherry.sh
index 1a6232013b471d9a3df6ab10705c263aa740c2f7..cf7af5502cd829074578237fc123eaa1ef37ab23 100755 (executable)
@@ -12,15 +12,15 @@ LONG_USAGE='             __*__*__*__*__> <upstream>
 Each commit between the fork-point (or <limit> if given) and <head> is
 examined, and compared against the change each commit between the
 fork-point and <upstream> introduces.  If the change seems to be in
-the upstream, it is shown on the standard output with prefix "+".
-Otherwise it is shown with prefix "-".'
+the upstream, it is shown on the standard output with prefix "-".
+Otherwise it is shown with prefix "+".'
 . git-sh-setup
 
 case "$1" in -v) verbose=t; shift ;; esac 
 
 case "$#,$1" in
 1,*..*)
-    upstream=$(expr "$1" : '\(.*\)\.\.') ours=$(expr "$1" : '.*\.\.\(.*\)$')
+    upstream=$(expr "z$1" : 'z\(.*\)\.\.') ours=$(expr "z$1" : '.*\.\.\(.*\)$')
     set x "$upstream" "$ours"
     shift ;;
 esac
@@ -51,9 +51,6 @@ patch=$tmp-patch
 mkdir $patch
 trap "rm -rf $tmp-*" 0 1 2 3 15
 
-_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
-
 for c in $inup
 do
        git-diff-tree -p $c