Re: [RFC][PATCH] for_each_ref() returning heads in wrong order
- From
Petr Baudis <pasky@suse.cz>
- Date
- Sep 23, 2006, 17:42 UTC
- Message-ID
- <20060923174235.GB20017@pasky.or.cz>
- In-Reply-To
- <Pine.LNX.4.63.0609231919510.25853@wbgn013.biozentrum.uni-wuerzburg.de>
Hi,
Dear diary, on Sat, Sep 23, 2006 at 07:20:42PM CEST, I got a letter where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
Show 13 quoted lines
> On Sat, 23 Sep 2006, Petr Baudis wrote: > > > Dear diary, on Sat, Sep 23, 2006 at 06:36:21PM CEST, I got a letter > > where Petr Baudis <pasky@suse.cz> said that... > > > Using the #next branch I've now hit a problem with git-fetch-pack > > > master choosing refs/bases/master (I geuss created by StGIT) instead > > > of refs/heads/master. The old upload-pack returned the refs in the order > > > heads-tags-everything_else but the new one just goes for whatever order > > > readdir() returns them in (modulo merging with packed refs). I actually > > > can't see the difference that caused this right now, though. > > Why don't you just specify (or match) "heads/refs/master", so that > git-fetch-pack cannot choose anything wrong to begin with?
hmm, does git-fetch prepend refs/heads/ to the refspecs or does it pass them as is to git-fetch-pack?
If the former, then we could as well do that, but in that case I'd rather just require that for any refs passed to git-fetch-pack since passing the "short form" just serves for buggy scripts to get confused when someone adds some refs directory that sorts before heads/ to the repository.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)