diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-08 20:06:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-08 20:06:36 -0700 |
commit | ca1c9913f8ac0ccaf976d44822076e1bba5bcd94 (patch) | |
tree | aa320cfc93864826fd28f0a84bac76d9f12a2d5e /git-merge.sh | |
parent | 31a3c6bb45aa61e45f1663871620eaf742f0abbb (diff) | |
parent | efb779f8873e5aa36be29a4e551186c62c1b580c (diff) | |
download | git-ca1c9913f8ac0ccaf976d44822076e1bba5bcd94.tar.gz git-ca1c9913f8ac0ccaf976d44822076e1bba5bcd94.tar.xz |
Merge branch 'sg/merge-options' (early part)
* 'sg/merge-options' (early part):
merge, pull: add '--(no-)log' command line option
fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
add 'merge.stat' config variable
merge, pull: introduce '--(no-)stat' option
doc: moved merge.* config variables into separate merge-config.txt
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-x | git-merge.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/git-merge.sh b/git-merge.sh index 7dbbb1d79..69b35d87e 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -8,8 +8,12 @@ OPTIONS_SPEC="\ git-merge [options] <remote>... git-merge [options] <msg> HEAD <remote> -- -summary show a diffstat at the end of the merge -n,no-summary don't show a diffstat at the end of the merge +stat show a diffstat at the end of the merge +n,no-stat 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 +no-log don't 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) ff allow fast forward (default) @@ -37,7 +41,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" \ @@ -148,10 +152,12 @@ merge_name () { parse_config () { while test $# != 0; do case "$1" in - -n|--no-summary) + -n|--no-stat|--no-summary) show_diffstat=false ;; - --summary) + --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." @@ -210,6 +216,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 @@ -258,7 +265,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 |