Re: [PATCHv2] fetch: Only call a new ref a "branch" if it's under refs/heads/.
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 13, 2012, 21:53 UTC
- Message-ID
- <20120413215316.GA19826@burratino>
- In-Reply-To
- <20120413211350.GD7919@sigill.intra.peff.net>
Jeff King wrote:
Show 16 quoted lines
> Hmm. The ref->name we are comparing here is the local side. So if I am > fetching a new branch "foo" from the remote into a local > "refs/remotes/origin/foo" tracking ref, it used to say: > > From ../parent > * [new branch] master -> origin/master > > Now it says: > > From ../parent > * [new ref] master -> origin/master > > while refs/remotes/* are not technically branches in our side, I think > from the user's perspective, it is true that we have fetched a branch. > Should we be calling refs/remotes/* branches, too? Should we be checking > the remote's name for the item instead of the local one?
The former sounds sensible. Then once the default refspec learns to fetch into separate refs/remotes/origin/heads/* and refs/remotes/origin/notes/* namespaces the logic could be updated to write [new branch] or [new note collection] according to the situation.
Jonathan