diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-15 03:13:34 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-15 03:13:34 -0700 |
commit | d7b6c3c0f54b951c85cd41c6e6571c65cf090111 (patch) | |
tree | 44c009ddd29ab5a986dba9028d0b57a0b2e03201 /builtin-cat-file.c | |
parent | 4c5cf8c44ce06a79da5bafd4a92e6d6f598cea2e (diff) | |
parent | 3cd4f5e8eb04ae01298ceaf46bb41a4277031916 (diff) | |
download | git-d7b6c3c0f54b951c85cd41c6e6571c65cf090111.tar.gz |
Merge branch 'master' into pb/gitpm
* master: (166 commits)
git-apply --binary: clean up and prepare for --reverse
Fix detection of ipv6 on Solaris
Look for sockaddr_storage in sys/socket.h
Solaris has strlcpy() at least since version 8
git-apply --reverse: simplify reverse option.
t4116 apply --reverse test
Make sha1flush void and remove conditional return.
Make upload_pack void and remove conditional return.
Make track_tree_refs void.
Make pack_objects void.
Make fsck_dir void.
Make checkout_all void.
Make show_entry void
Make pprint_tag void and cleans up call in cmd_cat_file.
Remove combine-diff.c::uninteresting()
read-cache.c cleanup
http-push.c cleanup
diff.c cleanup
builtin-push.c cleanup
builtin-grep.c cleanup
...
Diffstat (limited to 'builtin-cat-file.c')
-rw-r--r-- | builtin-cat-file.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin-cat-file.c b/builtin-cat-file.c index 814fb0743f..df009ade7a 100644 --- a/builtin-cat-file.c +++ b/builtin-cat-file.c @@ -26,7 +26,7 @@ static void flush_buffer(const char *buf, unsigned long size) } } -static int pprint_tag(const unsigned char *sha1, const char *buf, unsigned long size) +static void pprint_tag(const unsigned char *sha1, const char *buf, unsigned long size) { /* the parser in tag.c is useless here. */ const char *endp = buf + size; @@ -91,7 +91,6 @@ static int pprint_tag(const unsigned char *sha1, const char *buf, unsigned long */ if (cp < endp) flush_buffer(cp, endp - cp); - return 0; } int cmd_cat_file(int argc, const char **argv, const char *prefix) @@ -145,8 +144,10 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix) buf = read_sha1_file(sha1, type, &size); if (!buf) die("Cannot read object %s", argv[2]); - if (!strcmp(type, tag_type)) - return pprint_tag(sha1, buf, size); + if (!strcmp(type, tag_type)) { + pprint_tag(sha1, buf, size); + return 0; + } /* otherwise just spit out the data */ break; |