git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Arne Gangstad <finnag@pvv.org>
To: git@vger.kernel.org
Subject: [RFC/PATCH] git push usability improvements and default change
Date: Mon,  9 Mar 2009 23:35:44 +0100	[thread overview]
Message-ID: <1236638151-6465-1-git-send-email-finnag@pvv.org> (raw)

Usability improvements:

"-" is now an alias for the current remote (the remote of the current
branch or "origin" as a fallback). This works both for push, fetch,
pull, remote (and possibly some others), creating a lot of nice
shortcuts I think:
git remote prune - : prune the current remote
git push - HEAD : push the current branch to a branch of the same name
git fetch - next : fetch the next branch from the current remote

git push has learned two new command line options --matching and
--current, which override any configuration.  'matching' pushes all
branches that already exist at the remote, while 'current' pushes the
current branch to whatever it is tracking

I chose this behaviour for 'current', since it is the one that I find
most useful, and there seems to be no good way of expressing it from
the command line.  Pushing a branch to an identically named branch on
a remote can now easily be done by "git push - HEAD".

Also added a new configuration option push.default, which can have values
"nothing", "matching" and "current". This variable will only be used if
you have not specificed any refspecs at all, no command line options imply
any refspecs, and the current branch has no push configuration.

This is implemented in 1-3


git push default change:

git push will by default push "nothing" instead of "matching".

This is implemented in 4-7. 4-5 are for immediate consumption, 6 is for
next major release (or later), and 7 is even later.

4 Adds a warning if you have not configured push.default
5 Changes the wording to say that the default will change. 4 and 5 can
  be applied immediately.
6 changes the deault to "nothing", but keeps the warning.
7 removes the warning entirely

Finn Arne Gangstad (7):
      remote: Make "-" an alias for the current remote
      New config option push.default
      git push: New options --matching and --current
      git push: Display warning on unconfigured default push
      git push: Document that "nothing" is the future push default
      git push: Change default for "git push" to nothing.
      git push: Remove warning for "git push" default change

 Documentation/RelNotes-1.6.3.txt |    7 +++
 Documentation/config.txt         |   18 ++++++++
 Documentation/git-push.txt       |   14 +++++--
 builtin-push.c                   |   84 +++++++++++++++++++++++++++++--------
 cache.h                          |    7 +++
 config.c                         |   23 ++++++++++
 environment.c                    |    1 +
 remote.c                         |    2 +-
 transport.h                      |    9 ++++
 9 files changed, 142 insertions(+), 23 deletions(-)

- Finn Arne

             reply	other threads:[~2009-03-09 23:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 22:35 Finn Arne Gangstad [this message]
2009-03-09 22:35 ` [PATCH 1/7] remote: Make "-" an alias for the current remote Finn Arne Gangstad
2009-03-09 22:35 ` [PATCH 2/7] New config option push.default Finn Arne Gangstad
2009-03-09 22:35 ` [PATCH 3/7] git push: New options --matching and --current Finn Arne Gangstad
2009-03-09 23:49   ` Daniel Barkalow
2009-03-10  8:54     ` Finn Arne Gangstad
2009-03-09 22:35 ` [PATCH 4/7] git push: Display warning on unconfigured default push Finn Arne Gangstad
2009-03-10  0:25   ` Jay Soffian
2009-03-09 22:35 ` [PATCH 5/7] git push: Document that "nothing" is the future push default Finn Arne Gangstad
2009-03-09 22:35 ` [PATCH 6/7] git push: Change default for "git push" to nothing Finn Arne Gangstad
2009-03-09 22:35 ` [PATCH 7/7] git push: Remove warning for "git push" default change Finn Arne Gangstad
2009-03-09 23:35 ` [RFC/PATCH] git push usability improvements and " Johannes Schindelin
2009-03-10  0:12   ` Junio C Hamano
2009-03-10  8:46   ` Finn Arne Gangstad
2009-03-10 11:01     ` Johannes Schindelin
2009-03-10 11:12       ` Finn Arne Gangstad
2009-03-10  0:07 ` Junio C Hamano
2009-03-10  0:19   ` Junio C Hamano
2009-03-10 10:04   ` Finn Arne Gangstad
2009-03-10 16:20     ` Jay Soffian
2009-03-11 20:35     ` Junio C Hamano
2009-03-12  3:01       ` Nanako Shiraishi
2009-03-12 10:22         ` Finn Arne Gangstad
2009-03-12 10:52           ` Miles Bader
2009-03-12 12:20             ` Finn Arne Gangstad
2009-03-13  8:28               ` Miles Bader
2009-03-13 10:07                 ` John Tapsell
2009-03-10 17:52 ` Jeff King
2009-03-10 22:04   ` Finn Arne Gangstad
2009-03-10 22:10     ` Jeff King
2009-03-11  1:57     ` Jay Soffian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1236638151-6465-1-git-send-email-finnag@pvv.org \
    --to=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).