Merge branch 'rt/push-recurse-submodule-usage-string'
[gitweb.git] / contrib / subtree / git-subtree.sh
index dc59a91031ea6815456e5c86f5494bf56858c0d1..fa1a5839af2d0c423adb51238fb330f555dc4dff 100755 (executable)
@@ -46,6 +46,7 @@ ignore_joins=
 annotate=
 squash=
 message=
+prefix=
 
 debug()
 {
@@ -557,8 +558,9 @@ cmd_add_commit()
                commit=$(add_squashed_msg "$rev" "$dir" |
                         git commit-tree $tree $headp -p "$rev") || exit $?
        else
+               revp=$(peel_committish "$rev") &&
                commit=$(add_msg "$dir" "$headrev" "$rev" |
-                        git commit-tree $tree $headp -p "$rev") || exit $?
+                        git commit-tree $tree $headp -p "$revp") || exit $?
        fi
        git reset "$commit" || exit $?