projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge with http://www.kernel.org/pub/scm/git/git.git
[git.git]
/
git-applypatch.sh
diff --git
a/git-applypatch.sh
b/git-applypatch.sh
index
fd594ed
..
9f5a45b
100755
(executable)
--- a/
git-applypatch.sh
+++ b/
git-applypatch.sh
@@
-108,9
+108,10
@@
fi
tree=$(git-write-tree) || exit 1
echo Wrote tree $tree
tree=$(git-write-tree) || exit 1
echo Wrote tree $tree
-commit=$(git-commit-tree $tree -p $(cat "$GIT_DIR"/HEAD) < "$final") || exit 1
+parent=$(git-rev-parse --verify HEAD) &&
+commit=$(git-commit-tree $tree -p $parent <"$final") || exit 1
echo Committed: $commit
echo Committed: $commit
-echo $commit > "$GIT_DIR"/HEAD
+git-update-ref HEAD $commit $parent || exit
if test -x "$GIT_DIR"/hooks/post-applypatch
then
if test -x "$GIT_DIR"/hooks/post-applypatch
then