Include ref log detail in commit, reset, etc.
When updating a ref at the direction of the user include a reason why head was changed as part of the ref log (assuming it was enabled). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>maint
parent
7792cc2fa1
commit
67644a4d77
|
@ -447,7 +447,7 @@ do
|
||||||
parent=$(git-rev-parse --verify HEAD) &&
|
parent=$(git-rev-parse --verify HEAD) &&
|
||||||
commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") &&
|
commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") &&
|
||||||
echo Committed: $commit &&
|
echo Committed: $commit &&
|
||||||
git-update-ref HEAD $commit $parent ||
|
git-update-ref -m "am: $SUBJECT" HEAD $commit $parent ||
|
||||||
stop_here $this
|
stop_here $this
|
||||||
|
|
||||||
if test -x "$GIT_DIR"/hooks/post-applypatch
|
if test -x "$GIT_DIR"/hooks/post-applypatch
|
||||||
|
|
|
@ -204,7 +204,7 @@ echo Wrote tree $tree
|
||||||
parent=$(git-rev-parse --verify HEAD) &&
|
parent=$(git-rev-parse --verify HEAD) &&
|
||||||
commit=$(git-commit-tree $tree -p $parent <"$final") || exit 1
|
commit=$(git-commit-tree $tree -p $parent <"$final") || exit 1
|
||||||
echo Committed: $commit
|
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
|
if test -x "$GIT_DIR"/hooks/post-applypatch
|
||||||
then
|
then
|
||||||
|
|
|
@ -117,4 +117,4 @@ then
|
||||||
die "cannot force-update the current branch."
|
die "cannot force-update the current branch."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
git update-ref "refs/heads/$branchname" $rev
|
git update-ref -m "branch: Created from $head" "refs/heads/$branchname" $rev
|
||||||
|
|
|
@ -676,7 +676,8 @@ then
|
||||||
rm -f "$TMP_INDEX"
|
rm -f "$TMP_INDEX"
|
||||||
fi &&
|
fi &&
|
||||||
commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&
|
commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&
|
||||||
git-update-ref HEAD $commit $current &&
|
rlogm=$(sed -e 1q "$GIT_DIR"/COMMIT_MSG) &&
|
||||||
|
git-update-ref -m "commit: $rlogm" HEAD $commit $current &&
|
||||||
rm -f -- "$GIT_DIR/MERGE_HEAD" &&
|
rm -f -- "$GIT_DIR/MERGE_HEAD" &&
|
||||||
if test -f "$NEXT_INDEX"
|
if test -f "$NEXT_INDEX"
|
||||||
then
|
then
|
||||||
|
|
|
@ -48,7 +48,7 @@ then
|
||||||
else
|
else
|
||||||
rm -f "$GIT_DIR/ORIG_HEAD"
|
rm -f "$GIT_DIR/ORIG_HEAD"
|
||||||
fi
|
fi
|
||||||
git-update-ref HEAD "$rev"
|
git-update-ref -m "reset $reset_type $@" HEAD "$rev"
|
||||||
|
|
||||||
case "$reset_type" in
|
case "$reset_type" in
|
||||||
--hard )
|
--hard )
|
||||||
|
|
Loading…
Reference in New Issue