diff options
author | Junio C Hamano <junkio@cox.net> | 2006-07-30 23:42:10 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-30 23:42:10 -0700 |
commit | c1a788aceecb0a8e95d6442938ade9ca43df033e (patch) | |
tree | 30d99ae60a57281f75586d64f9853429fa3d26e7 /git-merge.sh | |
parent | f59aac47f3839367d0da04019b0fc2bd61345225 (diff) | |
parent | 076b0adcf9dac7bd9d18624087f679cc811aeb77 (diff) | |
download | git-c1a788aceecb0a8e95d6442938ade9ca43df033e.tar.gz git-c1a788aceecb0a8e95d6442938ade9ca43df033e.tar.xz |
Merge branch 'js/read-tree' into js/c-merge-recursive
* js/read-tree: (107 commits)
read-tree: move merge functions to the library
read-trees: refactor the unpack_trees() part
tar-tree: illustrate an obscure feature better
git.c: allow alias expansion without a git directory
setup_git_directory_gently: do not barf when GIT_DIR is given.
Build on Debian GNU/kFreeBSD
Call setup_git_directory() much earlier
Call setup_git_directory() early
Display an error from update-ref if target ref name is invalid.
Fix http-fetch
t4103: fix binary patch application test.
git-apply -R: binary patches are irreversible for now.
Teach git-apply about '-R'
Makefile: ssh-pull.o depends on ssh-fetch.c
log and diff family: honor config even from subdirectories
git-reset: detect update-ref error and report it.
lost-found: use fsck-objects --full
Teach git-http-fetch the --stdin switch
Teach git-local-fetch the --stdin switch
Make pull() support fetching multiple targets at once
...
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-x | git-merge.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/git-merge.sh b/git-merge.sh index 9b681159d..d049e1643 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -63,7 +63,13 @@ squash_message () { } 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" @@ -75,7 +81,7 @@ finish () { 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 ;; @@ -93,6 +99,7 @@ finish () { esac } +rloga= while case "$#" in 0) break ;; esac do case "$1" in @@ -126,6 +133,9 @@ do die "available strategies are: $all_strategies" ;; esac ;; + --reflog-action=*) + rloga=`expr "z$1" : 'z-[^=]*=\(.*\)'` + ;; -*) usage ;; *) break ;; esac @@ -140,6 +150,7 @@ shift # All the rest are remote heads test "$#" = 0 && usage ;# we need at least one remote head. +test "$rloga" = '' && rloga="merge: $@" remoteheads= for remote @@ -325,7 +336,7 @@ if test '' != "$result_tree" 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 |