aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 15:21:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 15:21:49 -0700
commit56ce69f7afa6d7ce2f33a1173c143a1b89bb9663 (patch)
tree6f32f69e6badad78e9a19ca8a146ec417b9067af
parentec4465adb38d21966acdc9510ff15c0fe4539468 (diff)
downloadgit-56ce69f7afa6d7ce2f33a1173c143a1b89bb9663.tar.gz
git-56ce69f7afa6d7ce2f33a1173c143a1b89bb9663.tar.xz
Make "fsck" also show what the name of the tag object is, not just
the name of the object it tags. You need this if you actually want to build up a list of tags.
-rw-r--r--fsck-cache.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index 12443b165..27c9ccdeb 100644
--- a/fsck-cache.c
+++ b/fsck-cache.c
@@ -73,6 +73,7 @@ static int fsck_tag(unsigned char *sha1, void *data, unsigned long size)
{
int typelen, taglen;
unsigned char object[20];
+ char object_hex[60];
const char *type_line, *tag_line, *sig_line;
if (size < 64)
@@ -98,10 +99,12 @@ static int fsck_tag(unsigned char *sha1, void *data, unsigned long size)
return -1;
taglen = sig_line - tag_line - strlen("tag \n");
- printf("tagged %.*s %s (%.*s)\n",
+ strcpy(object_hex, sha1_to_hex(object));
+ printf("tagged %.*s %s (%.*s) in %s\n",
typelen, type_line + 5,
- sha1_to_hex(object),
- taglen, tag_line + 4);
+ object_hex,
+ taglen, tag_line + 4,
+ sha1_to_hex(sha1));
return 0;
}