git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] add push --current and remote.*.pushHeadOnly
@ 2009-07-20  6:36 Paolo Bonzini
  2009-07-20  6:36 ` [PATCH 1/3] reintroduce PUSH_DEFAULT_UNSPECIFIED Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Paolo Bonzini @ 2009-07-20  6:36 UTC (permalink / raw)
  To: git; +Cc: gitster

This second series is gets rid of the most annoying part
(IMHO) of push.default = tracking, i.e. the fact that its
behavior cannot be achieved using git's ordinary tools.
While autosetuppush is enough to set the refspecs correctly,
push.tracking does not push _all_ tracked branches, but
only the current one (because it implicitly adds only
one refspec, while autosetuppush places them all in the
configuration).

What I introduce here is "git push --current" and a companion
remote.*.pushHeadOnly option to make it the default.  The
difference between "git push HEAD" and "git push --current"
is that the latter will still walk the remote.*.push refspecs,
but honor only the one matching HEAD.

Together with autosetuppush, this more or less achieves the
same result as push.tracking, at least for newly created
remotes.  A subsequent series will handle the transition.

v2 integrates changes from Nanako's review.  Patch 1 is new
and partially reverts bba0fd2 (push: do not give big warning
when no preference is configured, 2009-07-18).  Patch 2 is the
meat of the implementation.  Most of it actually touches the
transport mechanism, not builtin-push.c (which covers only
one detail about how to handle "git push --current" when
the remote does not have a corresponding push refspec).
Patch 3 adds remote.*.pushHeadOnly.

Paolo Bonzini (3):
      reintroduce PUSH_DEFAULT_UNSPECIFIED
      push: add --current
      push: add remote.*.pushHeadOnly configuration

 Documentation/config.txt   |    6 ++++
 Documentation/git-push.txt |   18 +++++++++++-
 builtin-push.c             |   17 +++++++++--
 cache.h                    |    1 +
 environment.c              |    2 +-
 http-push.c                |   27 ++++++++++++++----
 remote.c                   |   42 ++++++++++++++++++++++++-----
 remote.h                   |    3 ++
 t/t5516-fetch-push.sh      |   64 ++++++++++++++++++++++++++++++++++++++++++++
 transport.c                |   22 ++++++++++++++-
 transport.h                |    1 +
 11 files changed, 183 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH v3 0/3] add push --current and remote.*.pushHeadOnly
@ 2009-07-20 11:58 Paolo Bonzini
  2009-07-20 11:58 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2009-07-20 11:58 UTC (permalink / raw)
  To: git; +Cc: gitster

This second series is gets rid of the most annoying part (IMHO) of
push.default = tracking, i.e. the fact that its behavior cannot be
achieved using git's ordinary tools.  While autosetuppush is enough to
set the refspecs correctly, push.tracking does not push _all_ tracked
branches, but only the current one (because it implicitly adds only one
refspec, while autosetuppush places them all in the configuration).

What I introduce here is "git push --current" and a companion
remote.*.pushHeadOnly option to make it the default.  The difference
between "git push HEAD" and "git push --current" is that the latter
will still walk the remote.*.push refspecs, but honor only the one
matching HEAD.  This means that this option, unlike the "HEAD" refspec,
supports a destination name that differs from the source name.

Together with autosetuppush, this more or less achieves the same result
as push.tracking, at least for newly created remotes.  Two (three?)
subsequent series will handle the transition.

Patch 1 partially reverts bba0fd2 (push: do not give big warning when
no preference is configured, 2009-07-18).  Patch 2 is the meat of the
implementation.  Most of it actually touches the transport mechanism,
not builtin-push.c (which covers only one detail about how to handle
"git push --current" when the remote does not have a corresponding
push refspec).  Patch 3 adds remote.*.pushHeadOnly.

v3:
	documentation changes from Bjoern Steinbrink
	includes tests for http-push.c changes

v2:
	update to recent master
	changes from Nanako's review

Paolo Bonzini (3):
      reintroduce PUSH_DEFAULT_UNSPECIFIED
      push: add --current
      push: add remote.*.pushHeadOnly configuration

 Documentation/config.txt   |    6 ++++
 Documentation/git-push.txt |   17 ++++++++++-
 builtin-push.c             |   17 +++++++++--
 cache.h                    |    1 +
 environment.c              |    2 +-
 http-push.c                |   27 ++++++++++++++----
 remote.c                   |   42 ++++++++++++++++++++++++-----
 remote.h                   |    3 ++
 t/t5516-fetch-push.sh      |   64 ++++++++++++++++++++++++++++++++++++++++++++
 t/t5540-http-push.sh       |   32 ++++++++++++++++++++++
 transport.c                |   22 ++++++++++++++-
 transport.h                |    1 +
 12 files changed, 214 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/3]: add git push --current and remote.*.pushHeadOnly
@ 2009-07-13 23:07 Paolo Bonzini
  2009-07-13 23:07 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2009-07-13 23:07 UTC (permalink / raw)
  To: git

This second series is gets rid of the most annoying part
(IMHO) of push.default = tracking, i.e. the fact that its
behavior cannot be achieved using git's ordinary tools.
While autosetuppush is enough to set the refspecs correctly,
push.tracking does not push _all_ tracked branches, but
only the current one (because it implicitly adds only
one refspec, while autosetuppush places them all in the
configuration).

What I introduce here is "git push --current" and a companion
remote.*.pushHeadOnly option to make it the default.  The
difference between "git push HEAD" and "git push --current"
is that the latter will still walk the remote.*.push refspecs,
but honor only the one matching HEAD.

Together with autosetuppush, this more or less achieves the
same result as push.tracking, at least for newly created
remotes.  A subsequent series will handle the transition.

Patch 1 is the meat of the implementation.  Patch 2 touches
one detail about how to handle "git push --current" when
the remote does not have a corresponding push refspec.
Patch 3 adds remote.*.pushHeadOnly.

Paolo Bonzini (3):
 push: add --current
 change default push refspec when --current is given
 push: add remote.*.pushHeadOnly configuration

 Documentation/config.txt   |    6 ++++
 Documentation/git-push.txt |   15 +++++++++-
 builtin-push.c             |   15 ++++++++--
 http-push.c                |   27 ++++++++++++++----
 remote.c                   |   42 ++++++++++++++++++++++++-----
 remote.h                   |    3 ++
 t/t5516-fetch-push.sh      |   64 ++++++++++++++++++++++++++++++++++++++++++++
 transport.c                |   22 ++++++++++++++-
 transport.h                |    1 +
 9 files changed, 177 insertions(+), 18 deletions(-)

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

end of thread, other threads:[~2009-07-20 11:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-20  6:36 [PATCH 0/3] add push --current and remote.*.pushHeadOnly Paolo Bonzini
2009-07-20  6:36 ` [PATCH 1/3] reintroduce PUSH_DEFAULT_UNSPECIFIED Paolo Bonzini
2009-07-20  6:36 ` [PATCH 2/3] push: add --current Paolo Bonzini
2009-07-20  7:14   ` Björn Steinbrink
2009-07-20  9:48     ` Paolo Bonzini
2009-07-20 10:15   ` Tay Ray Chuan
2009-07-20 11:50     ` Paolo Bonzini
2009-07-20 11:17   ` demerphq
2009-07-20  6:37 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2009-07-20 11:58 [PATCH v3 0/3] add push --current and remote.*.pushHeadOnly Paolo Bonzini
2009-07-20 11:58 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini
2009-07-13 23:07 [PATCH 0/3]: add git push --current and remote.*.pushHeadOnly Paolo Bonzini
2009-07-13 23:07 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini

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).