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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <gitster@xxxxxxxxx>
---
 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' '
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]