Re: Friendly refspecs
- From
Jeff King <peff@peff.net>
- Date
- Apr 22, 2008, 20:05 UTC
- Message-ID
- <20080422200550.GB29313@sigill.intra.peff.net>
- In-Reply-To
- <7v63u9zva9.fsf@gitster.siamese.dyndns.org>
On Tue, Apr 22, 2008 at 09:52:46AM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> > 2. In my usage, pushing a branch to a tag (or vice versa) is the > > exception, so I don't mind favoring pushing like types to like > > types. > > > > But I recognize that (2) is based on my own workflow, so if people > > disagree, I guess it isn't so for everyone. > > So the proposal is: > > "git push $there $commit:$name", when $name does not begin with > refs/, is interpreted as "git push $there $commit:refs/heads/$name" > > right? I think that makes sense, at least to me.
No, the proposal is:
"git push $there $commit:$name", when $name does not begin with
refs/, is interpreted as "git push $there
$commit:$prefix/$name", where $prefix is determined by resolving
$commit and pulling off its first two directories.(or maybe this should just be picky and DWIM only for refs/heads and refs/tags). So "git push v1.0" is the same as "git push v1.0:v1.0", which is the same as "git push refs/tags/v1.0:refs/tags/v1.0".
-Peff