Git development
 help / color / mirror / Atom feed
* DWIM ref names for push/fetch
@ 2007-06-24 22:25 Daniel Barkalow
  2007-06-25  0:09 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Barkalow @ 2007-06-24 22:25 UTC (permalink / raw)
  To: git

AFAICT, the rules are currently:

for push, we compare the source against the list of local refs, and do 
some complicated stuff to figure out what it matches. Then we compare the 
destination against the list of remote refs (with no destination being 
interpreted as the full name of the source), and do the same complicated 
stuff.

for fetch, we accept anything that starts with "refs/heads/", 
"refs/tags/", or "refs/remotes/"; prepend "refs/" to anything that starts 
with "heads/", "tags/", or "remotes/"; and prepend "refs/heads/" to 
anything else. (NB: I'm looking at Julian's C translation, rather than the 
original shell scripts, which I find inpenetrable).

Is this difference simply due to the different languages the matching 
portions of these were originally written in? Would it be okay to change 
fetch to work like push? It would be nice to have a single procedure for 
determining which (if any) of a list of refs is the match for some string, 
regardless of why we're looking.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-25 18:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-24 22:25 DWIM ref names for push/fetch Daniel Barkalow
2007-06-25  0:09 ` Junio C Hamano
2007-06-25  3:12   ` Daniel Barkalow
2007-06-25  6:10     ` Junio C Hamano
2007-06-25 16:27       ` Daniel Barkalow
2007-06-25 18:45         ` Julian Phillips

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox