Thread (23 messages) flat view 23 messages, 5 authors, 2016-06-15
STALE3718d

Revision v1 of 3 in this series.

Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 06/12] t4150: am --resolved fails if index has unmerged entries

From: Paul Tan <hidden>
Date: 2016-06-15 23:05:38
Subsystem: the rest · Maintainer: Linus Torvalds

Since c1d1128 (git-am --resolved: more usable error message.,
2006-04-28), git-am --resolved will check to see if there are any
unmerged entries, and will error out with a user-friendly error message
if there are.

Add a test for this.

Cc: Junio C Hamano <redacted>
Signed-off-by: Paul Tan <redacted>
---
 t/t4150-am.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index a2bcffe..05494e9 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -436,6 +436,19 @@ test_expect_success 'am --resolved fails if index has no changes' '
 	test_cmp_rev lorem2^^ HEAD
 '
 
+test_expect_success 'am --resolved fails if index has unmerged entries' '
+	rm -fr .git/rebase-apply &&
+	git reset --hard &&
+	git checkout second &&
+	test_must_fail git am -3 lorem-move.patch &&
+	test_path_is_dir .git/rebase-apply &&
+	test_cmp_rev second HEAD &&
+	test_must_fail git am --resolved >err &&
+	test_path_is_dir .git/rebase-apply &&
+	test_cmp_rev second HEAD &&
+	test_i18ngrep "still have unmerged paths" err
+'
+
 test_expect_success 'am takes patches from a Pine mailbox' '
 	rm -fr .git/rebase-apply &&
 	git reset --hard &&
-- 
2.5.0.rc1.81.gfe77482
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help