Skip to content

Commit

Permalink
Make "fsck" also show what the name of the tag object is, not just
Browse files Browse the repository at this point in the history
the name of the object it tags.

You need this if you actually want to build up a list of tags.
  • Loading branch information
Linus Torvalds committed Apr 25, 2005
1 parent ec4465a commit 56ce69f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fsck-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}

Expand Down

0 comments on commit 56ce69f

Please sign in to comment.