diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2009-03-08 21:06:05 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-09 15:41:16 -0700 |
commit | a9c37a72c4fbc8537de294d66b05bdfd7f9a4016 (patch) | |
tree | 117ca075b1b84094aaabc9e4145434868ab43228 /builtin-fetch.c | |
parent | 8321c56b6bae25a2d70790f452df894be536b32c (diff) | |
download | git-a9c37a72c4fbc8537de294d66b05bdfd7f9a4016.tar.gz git-a9c37a72c4fbc8537de294d66b05bdfd7f9a4016.tar.xz |
Use a common function to get the pretty name of refs
The result should be consistent between fetch and push, so we ought to
use the same code in both cases, even though it's short.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r-- | builtin-fetch.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c index 1e4a3d9c5..f3bdeda05 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -197,11 +197,7 @@ static int update_local_ref(struct ref *ref, struct commit *current = NULL, *updated; enum object_type type; struct branch *current_branch = branch_get(NULL); - const char *pretty_ref = ref->name + ( - !prefixcmp(ref->name, "refs/heads/") ? 11 : - !prefixcmp(ref->name, "refs/tags/") ? 10 : - !prefixcmp(ref->name, "refs/remotes/") ? 13 : - 0); + const char *pretty_ref = prettify_ref(ref); *display = 0; type = sha1_object_info(ref->new_sha1, NULL); |