git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Teaching "git push" to map pushed refs
@ 2013-12-04  0:39 Junio C Hamano
  2013-12-04  0:39 ` [PATCH 1/3] builtin/push.c: use strbuf instead of manual allocation Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Junio C Hamano @ 2013-12-04  0:39 UTC (permalink / raw)
  To: git

Earlier, Peff taught "git fetch origin master" to update a
remote-tracking branch by internally mapping the colon-less refspec
'master' to '+refs/heads/master:refs/remotes/origin/master'.  Both

	git fetch origin
	git fetch origin master

would update the same refs/remotes/origin/master, which avoids
surprises.

However, we did not have a similar refspec mapping on the push
side.  This three-patch series does just that, and would help
triangular workflow by making these two:

	git checkout master && git push origin
	git push origin master

update the same ref at the 'origin'.

Junio C Hamano (3):
  builtin/push.c: use strbuf instead of manual allocation
  push: use remote.$name.push as a refmap
  push: also use "upstream" mapping when pushing a single ref

 Documentation/git-push.txt |  9 ++++--
 builtin/push.c             | 79 ++++++++++++++++++++++++++++++++--------------
 remote.c                   |  8 ++---
 remote.h                   |  2 ++
 t/t5516-fetch-push.sh      | 75 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 144 insertions(+), 29 deletions(-)

-- 
1.8.5.1-400-gbc1da41

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-05  1:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04  0:39 [PATCH 0/3] Teaching "git push" to map pushed refs Junio C Hamano
2013-12-04  0:39 ` [PATCH 1/3] builtin/push.c: use strbuf instead of manual allocation Junio C Hamano
2013-12-04  0:39 ` [PATCH 2/3] push: use remote.$name.push as a refmap Junio C Hamano
2013-12-04  0:39 ` [PATCH 3/3] push: also use "upstream" mapping when pushing a single ref Junio C Hamano
2013-12-05  1:27 ` [PATCH v2 0/3] Teaching "git push" to map pushed refs Junio C Hamano
2013-12-05  1:27   ` [PATCH v2 1/3] builtin/push.c: use strbuf instead of manual allocation Junio C Hamano
2013-12-05  1:27   ` [PATCH v2 2/3] push: use remote.$name.push as a refmap Junio C Hamano
2013-12-05  1:27   ` [PATCH v2 3/3] push: also use "upstream" mapping when pushing a single ref Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).