@matheusbsbs / matheus-bagliano / commits / cacbdd0afb
Fork 0

Fix repository corruption when using marks for modified blobs.

Apparently we did not copy the blob SHA1 into the stack variable 'sha1' when a mark is used to refer to a prior blob. This code was not previously tested as the Mozilla CVS -> git-fast-import program always fed us full SHA1s for modified blobs and did not use the mark feature there. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 11, 2007 at 21:25 UTC cacbdd0afb481a6f3019e5e7db98f88e40941fd5
1 file changed +1
fast-import.c
+1
@@ -1378,6 +1378,7 @@ static void file_change_m(struct branch *b)
1378 if (*p == ':') {
1379 char *x;
1380 oe = find_mark(strtoul(p + 1, &x, 10));
1381 + hashcpy(sha1, oe->sha1);
1382 p = x;
1383 } else {
1384 if (get_sha1_hex(p, sha1))