git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: gitster@pobox.com
Cc: git@vger.kernel.org, peff@peff.net, philipoakley@iee.org,
	Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH v2 2/2] Documentation/git-push: document that 'simple' is the default
Date: Thu, 25 Feb 2016 10:22:00 +0100	[thread overview]
Message-ID: <1456392120-16298-3-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <1456392120-16298-1-git-send-email-Matthieu.Moy@imag.fr>

The default behavior is well documented already in git-config(1), but
git-push(1) itself did not mention it at all. For users willing to learn
how "git push" works but not how to configure it, this makes the
documentation cumbersome to read.

Make the git-push(1) page self-contained by adding a short summary of
what 'push.default=simple' does, early in the page.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-push.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 32482ce..a992793 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -37,6 +37,13 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
 and if it is not found, honors `push.default` configuration to decide
 what to push (See linkgit:git-config[1] for the meaning of `push.default`).
 
+When neither the command-line nor the configuration specify what to
+push, the default behavior is used, which corresponds to the `simple`
+value for `push.default`: the current branch is pushed to the
+corresponding upstream branch, but as a safety measure, the push is
+aborted if the upstream branch does not have the same name as the
+local one.
+
 
 OPTIONS[[OPTIONS]]
 ------------------
-- 
2.7.2.334.g35ed2ae.dirty

  parent reply	other threads:[~2016-02-25  9:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 14:59 [PATCH] push: shorten "push.default is unset" warning message Matthieu Moy
2016-02-23 19:05 ` Junio C Hamano
2016-02-23 19:47   ` Matthieu Moy
2016-02-24 10:11   ` Jeff King
2016-02-23 20:38 ` Philip Oakley
2016-02-23 21:03   ` Matthieu Moy
2016-02-23 21:04     ` [PATCH] Documentation/git-push: document that 'simple' is the default Matthieu Moy
2016-02-25  9:21 ` [PATCH v2 0/2] Remove "push.default unset" warning Matthieu Moy
2016-02-25  9:21   ` [PATCH v2 1/2] push: remove "push.default is unset" warning message Matthieu Moy
2016-02-25  9:22   ` Matthieu Moy [this message]
2016-02-26 10:54   ` [PATCH v2 0/2] Remove "push.default unset" warning Jeff King

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=1456392120-16298-3-git-send-email-Matthieu.Moy@imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.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).