Commit a3e23a7c0a15cbeda434def500acb944a61cc5d4

Vicent Martí 2011-10-13T12:01:06

Merge pull request #455 from brodie/pack-fixes odb_pack: don't do ambiguity checks for fully qualified SHA1 hashes

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/pack.c b/src/pack.c
index 8de2d78..2516bea 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -722,7 +722,7 @@ static int pack_entry_find_offset(
 		}
 	}
 
-	if (found && pos + 1 < (int)p->num_objects) {
+	if (found && len != GIT_OID_HEXSZ && pos + 1 < (int)p->num_objects) {
 		/* Check for ambiguousity */
 		const unsigned char *next = current + stride;