From: Junio C Hamano Date: Mon, 29 Oct 2018 05:24:35 GMT Subject: Re: [PATCH v3 7/8] push: add DWYM support for "git push refs/remotes/...:" Message-ID: In-Reply-To: <20181026230741.23321-8-avarab@gmail.com> Ævar Arnfjörð Bjarmason writes: > Add DWYM support for pushing a ref in refs/remotes/* when the 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 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).