From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 6/6] refactor fetch's ref matching to use ref_abbrev_matches_full_with_rules()
Date: Sun, 11 Nov 2007 15:55:05 +0100 [thread overview]
Message-ID: <fh7548$15u$1@ger.gmane.org> (raw)
In-Reply-To: 11947897092576-git-send-email-prohaska@zib.de
Steffen Prohaska wrote:
> The old rules used by fetch were coded as a series of ifs. The old
> rules are:
> 1) match full refname if it starts with "refs/" or matches "HEAD"
> 2) verify that full refname starts with "refs/"
> 3) match abbreviated name in "refs/" if it starts with "heads/",
> "tags/", or "remotes/".
> 4) match abbreviated name in "refs/heads/"
>
> This is replaced by the new rules
> a) match full refname
> b) match abbreviated name prefixed with "refs/"
> c) match abbreviated name prefixed with "refs/heads/"
>
> The details of the new rules are different from the old rules. We no
> longer verify that the full refname starts with "refs/". The new rule
> (a) matches any full string. The old rules (1) and (2) were stricter.
> Now, the caller is responsible for using sensible full refnames. This
> should be the case for the current code. The new rule (b) is less
> strict than old rule (3). The new rule accepts abbreviated names that
> start with a non-standard prefix below "refs/".
>
> Despite this modifications the new rules should handle all cases as
> expected. Two tests are added to verify that fetch does not resolve
> short tags or HEAD in remotes.
>
> We may even think about loosening the rules a bit more and unify them
> with the rev-parse rules. This would be done by replacing
> ref_ref_fetch_rules with ref_ref_parse_rules. Note, the two new test
> would break.
Does still "origin" matches "origin/HEAD" if we have emote "origin"?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2007-11-11 14:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 14:01 [REPLACEMENT PATCH 0/6] improve refspec handling in push, refactor matching in fetch Steffen Prohaska
2007-11-11 14:01 ` [PATCH 1/6] push: mention --verbose option in documentation Steffen Prohaska
2007-11-11 14:01 ` [PATCH 2/6] push: teach push to pass --verbose option to transport layer Steffen Prohaska
2007-11-11 14:01 ` [PATCH 3/6] push: support pushing HEAD to real branch name Steffen Prohaska
2007-11-11 14:01 ` [PATCH 4/6] add ref_abbrev_matches_full_with_rules() Steffen Prohaska
2007-11-11 14:01 ` [PATCH 5/6] push: use same rules as git-rev-parse to resolve refspecs Steffen Prohaska
2007-11-11 14:01 ` [PATCH 6/6] refactor fetch's ref matching to use ref_abbrev_matches_full_with_rules() Steffen Prohaska
2007-11-11 14:55 ` Jakub Narebski [this message]
2007-11-11 17:31 ` Steffen Prohaska
2007-11-12 19:51 ` [PATCH 5/6] push: use same rules as git-rev-parse to resolve refspecs Junio C Hamano
2007-11-12 20:48 ` Steffen Prohaska
2007-11-12 19:51 ` [PATCH 4/6] add ref_abbrev_matches_full_with_rules() Junio C Hamano
2007-11-12 20:51 ` Steffen Prohaska
2007-11-11 14:17 ` [PATCH 3/6] push: support pushing HEAD to real branch name Andreas Ericsson
2007-11-11 14:35 ` [REPLACEMENT PATCH " Steffen Prohaska
2007-11-11 14:10 ` [PATCH 1/6] push: mention --verbose option in documentation Steffen Prohaska
2007-11-11 14:14 ` Steffen Prohaska
2007-11-11 19:39 ` Junio C Hamano
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='fh7548$15u$1@ger.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/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.