fetch: allow "git fetch $there v1.0" to fetch a tag
authorJunio C Hamano <gitster@pobox.com>
Fri, 4 Nov 2011 21:05:22 +0000 (14:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Nov 2011 23:34:30 +0000 (15:34 -0800)
You can already do so with "git fetch $there tags/v1.0" but if it is not
ambiguous there is no reason to force users to type more.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c

diff --git a/refs.c b/refs.c
index cab4394ad180b5daf02889fea523fa54abf0560f..ff20eeb5ba7a4d26d52d359263cb191cfbc61496 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -998,6 +998,7 @@ const char *ref_rev_parse_rules[] = {
 const char *ref_fetch_rules[] = {
        "%.*s",
        "refs/%.*s",
+       "refs/tags/%.*s",
        "refs/heads/%.*s",
        NULL
 };