From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] shorten_unambiguous_ref(): tighten up pointer arithmetic
Date: Fri, 10 Jan 2014 10:03:17 -0800 [thread overview]
Message-ID: <xmqqlhyn90ka.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <52D000CC.1060402@alum.mit.edu> (Michael Haggerty's message of "Fri, 10 Jan 2014 15:16:44 +0100")
Michael Haggerty <mhagger@alum.mit.edu> writes:
> As for removing the third argument of refname_match(): although all
> callers pass it ref_ref_parse_rules, that array is sometimes passed to
> the function via the alias "ref_fetch_rules". So I suppose somebody
> wanted to leave the way open to make these two rule sets diverge (though
> I don't know how likely that is to occur).
It is the other way around. We used to use two separate rules for
the normal ref resolution dwimming and dwimming done to decide which
remote ref to grab. For example, 'x' in 'git log x' can mean
'refs/remotes/x/HEAD', but 'git fetch origin x' would not grab
'refs/remotes/x/HEAD' at 'origin'. Also, 'git fetch origin v1.0'
did not look into 'refs/tags/v1.0' in the 'origin' repository back
when these two rules were different.
This was originally done very much on purpose, in order to avoid
surprises and to discourage meaningless usage---you would not expect
us to be interested in the state of a third repository that was
observed by our 'origin' the last time (which we do not even know
when).
When we harmonized these two rules later and we #defined out
ref_fetch_rules away to avoid potential breakages for in-flight
topics. The old synonym can now go safely.
next prev parent reply other threads:[~2014-01-10 18:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 14:43 [PATCH 0/3] Generate scanf_fmts more simply Michael Haggerty
2014-01-08 14:43 ` [PATCH 1/3] shorten_unambiguous_ref(): introduce a new local variable Michael Haggerty
2014-01-08 14:43 ` [PATCH 2/3] gen_scanf_fmt(): delete function and use snprintf() instead Michael Haggerty
2014-01-09 22:56 ` Junio C Hamano
2014-01-08 14:43 ` [PATCH 3/3] shorten_unambiguous_ref(): tighten up pointer arithmetic Michael Haggerty
2014-01-09 23:01 ` Junio C Hamano
2014-01-10 14:16 ` Michael Haggerty
2014-01-10 18:03 ` Junio C Hamano [this message]
2014-01-14 3:16 ` [PATCH] refname_match(): always use the rules in ref_rev_parse_rules Michael Haggerty
2014-01-14 22:16 ` Junio C Hamano
2014-01-15 16:54 ` Michael Haggerty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqlhyn90ka.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.