Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-11-21 23:38:31 +0300
committerJunio C Hamano <junkio@cox.net>2005-11-22 01:08:49 +0300
commitef07618fdd660057b80fe75007405c62502a5820 (patch)
tree68867d0b3f7a3c1918ffb614e4b48f90ced6d166 /pack-objects.c
parentb17e659dd4007cb1d3eb5ac32b524c0c5ab59601 (diff)
git-repack: Properly abort in corrupt repository
In a corrupt repository, git-repack produces a pack that does not contain needed objects without complaining, and the result of this combined with -d flag can be very painful -- e.g. a lossage of one tree object can lead to lossage of blobs reachable only through that tree. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-objects.c b/pack-objects.c
index 4e941e7392..8864a31cc1 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -524,7 +524,7 @@ int main(int argc, char **argv)
unsigned char sha1[20];
if (get_sha1_hex(line, sha1))
- die("expected sha1, got garbage");
+ die("expected sha1, got garbage:\n %s", line);
hash = 0;
p = line+40;
while (*p) {