Re: [PATCH v3 7/8] push: add DWYM support for "git push refs/remotes/...:<dst>"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> Add DWYM support for pushing a ref in refs/remotes/* when the <dst>

I think most people call it do-what-*I*-mean, not do-what-you-mean.

> ref is unqualified. Now instead of erroring out we support e.g.:
>
>     $ ./git-push avar refs/remotes/origin/master:upstream-master -n
>     To github.com:avar/git.git
>      * [new branch]            origin/master -> upstream-master
>
> Before this we wouldn't know what do do with
> refs/remotes/origin/master, now we'll look it up and discover that
> it's a commit (or tag) and add a refs/{heads,tags}/ prefix to <dst> as
> appropriate.

I am not sure if this is a good change, as I already hinted earlier.
If I were doing "git push" to any of my publishing places, I would
be irritated if "refs/remotes/ko/master:something" created a local
"something" branch at the desitnation, instead of erroring out.

On the other hand, I do not think I mind all that much if a src that
is a tag object to automatically go to refs/tags/ (having a tag
object in refs/remotes/** is rare enough to matter in the first
place).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux