git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 11/10] doc: push.default is no longer "matching"

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 8, 2013, 22:28 UTC
Message-ID
<7v1udvcnsf.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1357368788-28035-1-git-send-email-gitster@pobox.com>

The documentation for the command said that `push.default` is the default without referring to the releavant manual page.

Now `simple` is the default behaviour. Document it right there where we say we take the default value from `push.default`, and remove the description of old default being 'matching'.

Also reword cryptic desription of `--all`.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * I skimmed our two tutorials, just to be sure, but they do not
   discuss 'git push', so there was nothing to update there.
   I *think* we are minimally ready to switch the default behaviour
   now, but there may be other places that need similar adjustment.
   An independent audit is highly appreciated.
 Documentation/git-push.txt | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 8b637d3..f326afb 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -36,10 +36,14 @@ OPTIONS[[OPTIONS]]
 	The format of a <refspec> parameter is an optional plus
 	`+`, followed by the source ref <src>, followed
 	by a colon `:`, followed by the destination ref <dst>.
-	It is used to specify with what <src> object the <dst> ref
-	in the remote repository is to be updated.  If not specified,
+	It is used to specify what <src> object the <dst> ref
+	in the remote repository is to be updated to.  If no
+	<refspec> is specified on the command line, and if no
+	<refspec> is configured for the <repository>,
 	the behavior of the command is controlled by the `push.default`
-	configuration variable.
+	configuration variable, and if it is unset, the `simple`
+	behaviour is used (see lingit:git-config[1] and look
+	for `push.default`).
 +
 The <src> is often the name of the branch you would want to push, but
 it can be any arbitrary "SHA-1 expression", such as `master~4` or
@@ -65,14 +69,11 @@ the remote repository.
 The special refspec `:` (or `+:` 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) and
-no `push.default` configuration variable is set.
+already exists on the remote side.
 
 --all::
-	Instead of naming each ref to push, specifies that all
-	refs under `refs/heads/` be pushed.
+	Push all branches (i.e. refs under `refs/heads/`); cannot be
+	used with other <refspec>.
 
 --prune::
 	Remove remote branches that don't have a local counterpart. For example
-- 
1.8.1.317.ga1ba510
Previous: Matthieu Moy
Message 13 of 13 in “push: switch default from "matching" to "simple"”
  1. 00/10 push: switch default from "matching" to "simple"Junio C Hamano, Jan 5, 2013
  2. 01/10 t5404: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  3. 02/10 t5505: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  4. 03/10 t5516: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  5. 04/10 t5517: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  6. 05/10 t5519: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  7. 06/10 t5531: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  8. 07/10 t7406: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  9. 08/10 t9400: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  10. 09/10 t9401: do not assume the "matching" push is the defaultJunio C Hamano, Jan 5, 2013
  11. 10/10 push: switch default from "matching" to "simple"Junio C Hamano, Jan 5, 2013
  12. Matthieu MoyJan 5, 2013
  13. 11/10 doc: push.default is no longer "matching"Junio C Hamano, Jan 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.