DORMANTno replies

[PATCH] t5500: do not depend on the way an earlier pull fails

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:08:49
Subsystem: the rest · Maintainer: Linus Torvalds

Three tests before the test updated here is a test that is called
'pull in shallow repo with missing merge base' and does this:

    test_must_fail git pull --depth 4 .. A

While attempting to create a merge after fetching necessary objects,
the current implementation happens to create a throw-away object to
represent a conflicted merge result before failing.  This object is
not connected to any of the refs in the result (i.e. prunable).

The test touched by this patch counts the number of loose objects
and depends on the presence of this prunable garbage.  Once we
improve the implementation of "merge" not to leave such a throw-away
object in the object database, this will start failing.

Remove the throw-away object, if any, before counting in order to
future-proof this test.

Signed-off-by: Junio C Hamano <redacted>
---
 t/t5500-fetch-pack.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index e5f83bf..f4e479a 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -279,9 +279,10 @@ test_expect_success 'clone shallow depth count' '
 test_expect_success 'clone shallow object count' '
 	(
 		cd shallow &&
+		git prune &&
 		git count-objects -v
 	) > count.shallow &&
-	grep "^count: 55" count.shallow
+	grep "^count: 54" count.shallow
 '
 
 test_expect_success 'fetch --no-shallow on full repo' '
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help