X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-applypatch.sh;h=8df2aee4c2d031ac10c66af0a079bd022c281c0d;hb=a2a3bf7b2baf0ff64c5b5ffc78d54be82d9967f1;hp=214f5c31a6020ae63b4fee3c245156717d536252;hpb=6cf6193b458a5791dba993a81d3bb77f4dc030ac;p=git.git diff --git a/git-applypatch.sh b/git-applypatch.sh index 214f5c31a..8df2aee4c 100755 --- a/git-applypatch.sh +++ b/git-applypatch.sh @@ -14,7 +14,7 @@ USAGE=' []' . git-sh-setup -[[ "$#" = "3" || "$#" = "4" ]] || usage +case "$#" in 3|4) ;; *) usage ;; esac final=.dotest/final-commit ## @@ -182,7 +182,7 @@ git-apply --index "$PATCHFILE" || { # This is not so wrong. Depending on which base we picked, # orig_tree may be wildly different from ours, but his_tree # has the same set of wildly different changes in parts the - # patch did not touch, so resolve ends up cancelling them, + # patch did not touch, so resolve ends up canceling them, # saying that we reverted all those changes. if git-merge-resolve $orig_tree -- HEAD $his_tree @@ -204,7 +204,7 @@ echo Wrote tree $tree parent=$(git-rev-parse --verify HEAD) && commit=$(git-commit-tree $tree -p $parent <"$final") || exit 1 echo Committed: $commit -git-update-ref HEAD $commit $parent || exit +git-update-ref -m "applypatch: $SUBJECT" HEAD $commit $parent || exit if test -x "$GIT_DIR"/hooks/post-applypatch then