added -p alias for --prefix
[gitweb.git] / git-subtree.sh
index cccc3400fdd8e3a06ccf8ac8f17589ca08afbffb..28fb8e81fb80349a17763a819666308ebc0a589e 100755 (executable)
@@ -16,7 +16,7 @@ git subtree split --prefix=<prefix> <commit...>
 h,help        show the help
 q             quiet
 d             show debug messages
-prefix=       the name of the subdir to split out
+p,prefix=     the name of the subdir to split out
  options for 'split'
 annotate=     add a prefix to commit message of new commits
 b,branch=     create a new branch from the split subtree
@@ -76,7 +76,7 @@ while [ $# -gt 0 ]; do
                --annotate) annotate="$1"; shift ;;
                --no-annotate) annotate= ;;
                -b) branch="$1"; shift ;;
-               --prefix) prefix="$1"; shift ;;
+               -p) prefix="$1"; shift ;;
                --no-prefix) prefix= ;;
                --onto) onto="$1"; shift ;;
                --no-onto) onto= ;;
@@ -567,8 +567,9 @@ cmd_merge()
 cmd_pull()
 {
        ensure_clean
-       set -x
-       git pull -s subtree "$@"
+       git fetch "$@" || exit $?
+       revs=FETCH_HEAD
+       cmd_merge
 }
 
 "cmd_$command" "$@"