summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed0e078)
raw | patch | inline | side by side (parent: ed0e078)
author | Shawn Pearce <spearce@spearce.org> | |
Tue, 11 Jul 2006 05:52:54 +0000 (01:52 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 11 Jul 2006 21:16:53 +0000 (14:16 -0700) |
When git-merge updates HEAD as a result of a merge record what
happened during the merge into the reflog associated with HEAD
(if any). The log reports who caused the update (git-merge or
git-pull, by invoking git-merge), what the remote ref names were
and the type of merge process used.
The merge information can be useful when reviewing a reflog for
a branch such as `master` where fast forward and trivial in index
merges might be common as the user tracks an upstream.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
happened during the merge into the reflog associated with HEAD
(if any). The log reports who caused the update (git-merge or
git-pull, by invoking git-merge), what the remote ref names were
and the type of merge process used.
The merge information can be useful when reviewing a reflog for
a branch such as `master` where fast forward and trivial in index
merges might be common as the user tracks an upstream.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge.sh | patch | blob | history | |
git-pull.sh | patch | blob | history |
diff --git a/git-merge.sh b/git-merge.sh
index 24e3b507ef1f907e7146a2653189f45a92db08fd..a9cfafb1dfba6e85834a33caf6b3c69910594bf6 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
}
finish () {
- test '' = "$2" || echo "$2"
+ if test '' = "$2"
+ then
+ rlogm="$rloga"
+ else
+ echo "$2"
+ rlogm="$rloga: $2"
+ fi
case "$squash" in
t)
echo "Squash commit -- not updating HEAD"
echo "No merge message -- not updating HEAD"
;;
*)
- git-update-ref HEAD "$1" "$head" || exit 1
+ git-update-ref -m "$rlogm" HEAD "$1" "$head" || exit 1
;;
esac
;;
esac
}
+rloga=
while case "$#" in 0) break ;; esac
do
case "$1" in
die "available strategies are: $all_strategies" ;;
esac
;;
+ --reflog-action=*)
+ rloga=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+ ;;
-*) usage ;;
*) break ;;
esac
# All the rest are remote heads
test "$#" = 0 && usage ;# we need at least one remote head.
+test "$rloga" = '' && rloga="merge: $@"
remoteheads=
for remote
then
parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
result_commit=$(echo "$merge_msg" | git-commit-tree $result_tree $parents) || exit
- finish "$result_commit" "Merge $result_commit, made by $wt_strategy."
+ finish "$result_commit" "Merge made by $wt_strategy."
dropsave
exit 0
fi
diff --git a/git-pull.sh b/git-pull.sh
index d337bf4da31c8a86eeaee7b34b910611100ccca8..f380437997f053d15a177a941f3b8a1543c56a18 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
esac
merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
-git-merge $no_summary $no_commit $squash $strategy_args \
+git-merge "--reflog-action=pull $*" \
+ $no_summary $no_commit $squash $strategy_args \
"$merge_name" HEAD $merge_head