Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-09-24 02:51:44 +0400
committerJunio C Hamano <gitster@pobox.com>2007-09-24 04:14:03 +0400
commitd08af0ad745869a4fe36bc8df4f9804edfb74eb9 (patch)
treee12eb7e4ce147d4f4c386a8da97c3748950c84ca /t/t7600-merge.sh
parentaec7b362ad07e1a2c58051c8db653dabffee8960 (diff)
git-merge: add support for --commit and --no-squash
These options can be used to override --no-commit and --squash, which is needed since --no-commit and --squash now can be specified as default merge options in $GIT_DIR/config. The change also introduces slightly different behavior for --no-commit: when specified, it explicitly overrides --squash. Earlier, 'git merge --squash --no-commit' would result in a squashed merge (i.e. no $GIT_DIR/MERGE_HEAD was created) but with this patch the command will behave as if --squash hadn't been specified. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7600-merge.sh')
-rwxr-xr-xt/t7600-merge.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 110974cd01..b0ef488c29 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -395,4 +395,26 @@ test_expect_success 'override config option --summary' '
test_debug 'gitk --all'
+test_expect_success 'merge c1 with c2 (override --no-commit)' '
+ git reset --hard c1 &&
+ git config branch.master.mergeoptions "--no-commit" &&
+ test_tick &&
+ git merge --commit c2 &&
+ verify_merge file result.1-5 msg.1-5 &&
+ verify_parents $c1 $c2
+'
+
+test_debug 'gitk --all'
+
+test_expect_success 'merge c1 with c2 (override --squash)' '
+ git reset --hard c1 &&
+ git config branch.master.mergeoptions "--squash" &&
+ test_tick &&
+ git merge --no-squash c2 &&
+ verify_merge file result.1-5 msg.1-5 &&
+ verify_parents $c1 $c2
+'
+
+test_debug 'gitk --all'
+
test_done