git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: David Glasser <glasser@davidglasser.net>, git@vger.kernel.org
Subject: Re: push.default documented in "man git-push"?
Date: Tue, 02 Oct 2012 11:34:39 -0700	[thread overview]
Message-ID: <7vbogk90zk.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALkWK0nQu_vvLGu=j2CDkGcKtp-T401kDyhD5_iMqQrkGk9K8Q@mail.gmail.com> (Ramkumar Ramachandra's message of "Tue, 2 Oct 2012 21:08:00 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> David Glasser wrote:
>> Thanks Rankumar! There's also the reference in the "git push origin"
>> example and the "This is the default operation mode if no explicit
>> refspec is found".
>
> Sorry;  here's a revised patch.
>
> --8<--

FYI: the above is not a scissors line.

> From: Ramkumar Ramachandra <artagnon@gmail.com>
> Date: Tue, 2 Oct 2012 21:06:05 +0530
> Subject: [PATCH] Documentation: mention `push.default` in git-push.txt
>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  Documentation/git-push.txt | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index cb97cc1..e1e9aca 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -37,7 +37,8 @@ OPTIONS[[OPTIONS]]
>         `+`, 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.
> +       in the remote repository is to be updated.  If not specified,
> +       the configuration variable `push.default` is used.

I think this is way suboptimal; it is begging users to do this

	[push]
		default = frotz:xyzzy

by making it sound as if push.default gives a default for <refs>.

> @@ -65,7 +66,8 @@ directs git to push "matching" branches: for every
> branch that
>  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).
> +nor in any Push line of the corresponding remotes file, or `push.default`
> +---see below).

Likewise.  The added part should not be inside the parentheses,
which is about what the value used for refspec.  `push.default` is
about what happens when there is _no_ refspec.

I'll queue this instead.  Thanks.

-- >8 --
From: Ramkumar Ramachandra <artagnon@gmail.com>
Date: Tue, 2 Oct 2012 21:08:00 +0530
Subject: [PATCH] Documentation: mention `push.default` in git-push.txt

It already is listed in the "git config" documentation, but people
interested in pushing would first look at "git push" documentation.

Noticed-by: David Glasser
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Fixed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/git-push.txt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index cb97cc1..70b18bc 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -37,7 +37,9 @@ OPTIONS[[OPTIONS]]
 	`+`, 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.
+	in the remote repository is to be updated.  If not specified,
+	the behavior of the command is controled by the `push.default`
+	configuration variable.
 +
 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,7 +67,8 @@ 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).
+nor in any Push line of the corresponding remotes file---see below) and
+no `push.default` configuration variable is set.
 
 --all::
 	Instead of naming each ref to push, specifies that all
@@ -357,7 +360,8 @@ Examples
 	`git push origin :`.
 +
 The default behavior of this command when no <refspec> is given can be
-configured by setting the `push` option of the remote.
+configured by setting the `push` option of the remote, or the `push.default`
+configuration variable.
 +
 For example, to default to pushing only the current branch to `origin`
 use `git config remote.origin.push HEAD`.  Any valid <refspec> (like
-- 
1.8.0.rc0.45.g7ce8dc5

  parent reply	other threads:[~2012-10-02 18:34 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02  0:25 push.default documented in "man git-push"? David Glasser
2012-10-02 15:09 ` Ramkumar Ramachandra
2012-10-02 15:18   ` David Glasser
2012-10-02 15:38     ` Ramkumar Ramachandra
2012-10-02 16:45       ` Matthieu Moy
2012-10-02 16:56         ` Ramkumar Ramachandra
2012-10-02 17:21         ` Junio C Hamano
2012-10-02 17:25           ` Matthieu Moy
2012-10-02 18:34       ` Junio C Hamano [this message]
2012-10-02 19:00         ` David Glasser
2012-10-02 19:08           ` Junio C Hamano
2012-10-03  7:54         ` Matthieu Moy
2012-10-03  8:52         ` Ramkumar Ramachandra
2012-10-03  8:14   ` Nguyen Thai Ngoc Duy
2012-10-03  8:17     ` Ramkumar Ramachandra
2012-10-03  8:23       ` Nguyen Thai Ngoc Duy
2012-10-03  8:46         ` Ramkumar Ramachandra
2012-10-03 10:18           ` Nguyen Thai Ngoc Duy
2012-10-03 18:26             ` Junio C Hamano
2012-10-03 21:40               ` Jeff King
2012-10-08 17:12                 ` Junio C Hamano
2012-10-07 16:09               ` Ramkumar Ramachandra
2012-10-07 20:27                 ` Junio C Hamano
2012-10-08  7:27                   ` Ramkumar Ramachandra
2012-10-08  8:35                     ` Nguyen Thai Ngoc Duy
2012-10-03 18:49             ` Junio C Hamano
2012-10-04  2:01               ` Nguyen Thai Ngoc Duy
2012-10-04  5:45                 ` Junio C Hamano
2012-10-05  6:34                   ` Nguyen Thai Ngoc Duy
2012-10-05 20:03                     ` Junio C Hamano
2012-10-11 12:43                       ` Nguyen Thai Ngoc Duy
2012-10-11 14:18                         ` Matthieu Moy
2012-10-11 14:43                           ` Nguyen Thai Ngoc Duy
2012-10-11 16:17                           ` Junio C Hamano
2012-10-03 11:58     ` Peter Krefting

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=7vbogk90zk.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=glasser@davidglasser.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).