t3200-branch: test -M
[gitweb.git] / contrib / subtree / git-subtree.sh
index db925ca76991c635ea53fe7f38d6608d08dfc4d5..fa1a5839af2d0c423adb51238fb330f555dc4dff 100755 (executable)
@@ -558,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 $?