X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-merge.sh;h=8026ccff4a459a75148740382646f7fe10b00255;hb=4df0d7af6be27fe5b0ffef438ef0169607253f66;hp=0b15924006b2307eb70308dcf854c05e7dd05c98;hpb=d8abe148bece83f6c3e5ebe6075aef236322ed74;p=git.git diff --git a/git-merge.sh b/git-merge.sh index 0b1592400..8026ccff4 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -9,11 +9,11 @@ git-merge [options] ... git-merge [options] HEAD -- stat show a diffstat at the end of the merge -n,no-stat don't show a diffstat at the end of the merge +n don't show a diffstat at the end of the merge summary (synonym to --stat) -no-summary (synonym to --no-stat) +log add list of one-line log to merge commit message squash create a single commit instead of doing a merge -commit perform a commit if the merge sucesses (default) +commit perform a commit if the merge succeeds (default) ff allow fast forward (default) s,strategy= merge strategy to use m,message= message to be used for the merge commit (if any) @@ -39,7 +39,7 @@ use_strategies= allow_fast_forward=t allow_trivial_merge=t -squash= no_commit= +squash= no_commit= log_arg= dropsave() { rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" \ @@ -154,6 +154,8 @@ parse_config () { show_diffstat=false ;; --stat|--summary) show_diffstat=t ;; + --log|--no-log) + log_arg=$1 ;; --squash) test "$allow_fast_forward" = t || die "You cannot combine --squash with --no-ff." @@ -212,6 +214,7 @@ while test $args_left -lt $#; do shift; done if test -z "$show_diffstat"; then test "$(git config --bool merge.diffstat)" = false && show_diffstat=false + test "$(git config --bool merge.stat)" = false && show_diffstat=false test -z "$show_diffstat" && show_diffstat=t fi @@ -260,7 +263,7 @@ else merge_name=$(for remote do merge_name "$remote" - done | git fmt-merge-msg + done | git fmt-merge-msg $log_arg ) merge_msg="${merge_msg:+$merge_msg$LF$LF}$merge_name" fi