send-email: simplify Gmail example in the documentation
[gitweb.git] / t / t7501-commit.sh
index 900f7de05a67424c867e0f149e7e7a448111791c..d84897a67a3c365e280f88b36f43fc49e1ac9d7b 100755 (executable)
@@ -607,4 +607,24 @@ test_expect_success '--only works on to-be-born branch' '
        test_cmp expected actual
 '
 
+test_expect_success '--dry-run with conflicts fixed from a merge' '
+       # setup two branches with conflicting information
+       # in the same file, resolve the conflict,
+       # call commit with --dry-run
+       echo "Initial contents, unimportant" >test-file &&
+       git add test-file &&
+       git commit -m "Initial commit" &&
+       echo "commit-1-state" >test-file &&
+       git commit -m "commit 1" -i test-file &&
+       git tag commit-1 &&
+       git checkout -b branch-2 HEAD^1 &&
+       echo "commit-2-state" >test-file &&
+       git commit -m "commit 2" -i test-file &&
+       ! $(git merge --no-commit commit-1) &&
+       echo "commit-2-state" >test-file &&
+       git add test-file &&
+       git commit --dry-run &&
+       git commit -m "conflicts fixed from merge."
+'
+
 test_done