Message ID | 7vaa8bbni3.fsf@alter.siamese.dyndns.org |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
On Fri, Nov 4, 2011 at 2:12 PM, Junio C Hamano <gitster@pobox.com> wrote: > > If we really wanted to go this route, the attached single-liner should be > sufficient for the DWIMmery. My first reaction on reading the patch was "maybe it would be safer to put the tags case after 'branches', so that the behavior in the presense of ambiguity would stay the same as with the old case", but thinking it through I think it's more important to be consistent with the other lookups, which all prefer tags over branches when ambiguous. So Ack, patch looks sane to me, and clearly makes it easier to fetch tags individually. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/refs.c b/refs.c index e69ba26..670a7b3 100644 --- a/refs.c +++ b/refs.c @@ -1001,6 +1001,7 @@ const char *ref_rev_parse_rules[] = { const char *ref_fetch_rules[] = { "%.*s", "refs/%.*s", + "refs/tags/%.*s", "refs/heads/%.*s", NULL };