git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Arne Gangstad <finnag@pvv.org>
To: git@vger.kernel.org
Subject: [PATCH 6/7] git push: Change default for "git push" to nothing.
Date: Mon,  9 Mar 2009 23:35:50 +0100	[thread overview]
Message-ID: <1236638151-6465-7-git-send-email-finnag@pvv.org> (raw)
In-Reply-To: <1236638151-6465-1-git-send-email-finnag@pvv.org>

Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
---
 Documentation/config.txt   |    4 ++--
 Documentation/git-push.txt |    4 +---
 builtin-push.c             |    7 ++++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 50bc1d0..437216c 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1170,10 +1170,10 @@ push.default::
 	branch, or `origin` if no remote is configured. `origin` is also used
 	if you are not on any branch.
 +
-* `nothing` do not push anything
+* `nothing` do not push anything.  This is new the default value.
 * `matching` push all matching branches to the current remote.
   All branches having the same name in both ends are considered to be
-  matching. This is the default value.
+  matching.  This used to be the default value.
 * `current` push the current branch to the branch it is tracking on
   the remote
 
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index cb7b3d2..149c1f0 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -64,9 +64,7 @@ the remote repository.
 The special refspec `:` (or `{plus}:` to allow non-fast forward updates)
 directs git to push "matching" branches: for every branch that exists on
 the local side, the remote side is updated if a branch of the same name
-already exists on the remote side.  This is the default operation mode
-if no explicit refspec is found (that is neither on the command line
-nor in any Push line of the corresponding remotes file---see below).
+already exists on the remote side.
 
 --all::
 	Instead of naming each ref to push, specifies that all
diff --git a/builtin-push.c b/builtin-push.c
index 7ef499f..93f12a8 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -104,6 +104,10 @@ static void handle_default_push(struct remote *remote, int *flags)
 		warn_unconfigured_push();
 		/* fallthrough */
 
+	case PUSH_DEFAULT_NOTHING:
+		die("No refspec given, and none configured.");
+		break;
+
 	case PUSH_DEFAULT_MATCHING:
 		add_refspec(":");
 		break;
@@ -112,9 +116,6 @@ static void handle_default_push(struct remote *remote, int *flags)
 		setup_push_current(remote);
 		break;
 
-	case PUSH_DEFAULT_NOTHING:
-		die("No refspec given, and none configured.");
-		break;
 	}
 }
 
-- 
1.6.2.105.g6ff1f.dirty

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

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 22:35 [RFC/PATCH] git push usability improvements and default change Finn Arne Gangstad
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 ` Finn Arne Gangstad [this message]
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-7-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).