{"thread":{"id":"31706","subject":"push.default documented in \"man git-push\"?","startedAt":"2012-10-02T00:25:13Z","lastAt":"2012-10-11T16:17:50Z","messageCount":35,"participants":["David Glasser","Ramkumar Ramachandra","Matthieu Moy","Junio C Hamano","Nguyen Thai Ngoc Duy","Peter Krefting","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"200305","messageId":"CAN7QDoK4WCuRMu+KV6ACo9miR9_eFEE510J5PDiPk+BXLyQG9Q@mail.gmail.com","threadId":"31706","inReplyTo":null,"subject":"push.default documented in \"man git-push\"?","fromName":"David Glasser","fromEmail":"glasser@davidglasser.net","sentAt":"2012-10-02T00:25:13Z","receivedAt":"2012-10-02T00:25:13Z","isPatch":false,"sender":{"key":"glasser@davidglasser.net","avatar":"https://avatars.githubusercontent.com/u/16724?v=4"},"body":"Is the newish push.default documented in the \"git push\" manpage\nanywhere? I don't see it mentioned (and there are several references\nto the \"default\" behavior), but maybe I'm missing something. Is it\nleft out on purpose (ie, config values aren't supposed to be mentioned\nin command manpages)?\n\n--dave\n\n-- \nglasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/\n"},{"id":"200327","messageId":"CALkWK0mxLQNOE8kZUJrxYQMWXpzZW0uS+N2iGXxdRmCXTzYcBQ@mail.gmail.com","threadId":"31706","inReplyTo":"CAN7QDoK4WCuRMu+KV6ACo9miR9_eFEE510J5PDiPk+BXLyQG9Q@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-02T15:09:11Z","receivedAt":"2012-10-02T15:09:11Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"David Glasser wrote:\n> Is the newish push.default documented in the \"git push\" manpage\n> anywhere? I don't see it mentioned (and there are several references\n> to the \"default\" behavior), but maybe I'm missing something. Is it\n> left out on purpose (ie, config values aren't supposed to be mentioned\n> in command manpages)?\n\nYou're right.  It's documented in `man git-config`, but we should\nprobably mention it in the `git-push` manpage.\n\n--8<--\nFrom: Ramkumar Ramachandra <artagnon@gmail.com>\nDate: Tue, 2 Oct 2012 20:37:13 +0530\nSubject: [PATCH] Documentation: mention `push.default` in git-push.txt\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-push.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex cb97cc1..8751b38 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -37,7 +37,8 @@ OPTIONS[[OPTIONS]]\n        `+`, followed by the source ref <src>, followed\n        by a colon `:`, followed by the destination ref <dst>.\n        It is used to specify with what <src> object the <dst> ref\n-       in the remote repository is to be updated.\n+       in the remote repository is to be updated.  If not specified,\n+       the configuration variable `push.default` is used.\n +\n The <src> is often the name of the branch you would want to push, but\n it can be any arbitrary \"SHA-1 expression\", such as `master~4` or\n-- \n1.7.12.1.428.g652398a.dirty\n"},{"id":"200328","messageId":"CAN7QDoJ=PKt_1zW58648tcaT7MP1MTVJo9E4PW5g93K_tO91Jw@mail.gmail.com","threadId":"31706","inReplyTo":"CALkWK0mxLQNOE8kZUJrxYQMWXpzZW0uS+N2iGXxdRmCXTzYcBQ@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"David Glasser","fromEmail":"glasser@davidglasser.net","sentAt":"2012-10-02T15:18:04Z","receivedAt":"2012-10-02T15:18:04Z","isPatch":false,"sender":{"key":"glasser@davidglasser.net","avatar":"https://avatars.githubusercontent.com/u/16724?v=4"},"body":"Thanks Rankumar! There's also the reference in the \"git push origin\"\nexample and the \"This is the default operation mode if no explicit\nrefspec is found\".\n\n(I would have sent my own patch but I can't figure out where the\nsyntax for the manpages is documented.)\n\n--dave\n\nOn Tue, Oct 2, 2012 at 8:09 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> David Glasser wrote:\n>> Is the newish push.default documented in the \"git push\" manpage\n>> anywhere? I don't see it mentioned (and there are several references\n>> to the \"default\" behavior), but maybe I'm missing something. Is it\n>> left out on purpose (ie, config values aren't supposed to be mentioned\n>> in command manpages)?\n>\n> You're right.  It's documented in `man git-config`, but we should\n> probably mention it in the `git-push` manpage.\n>\n> --8<--\n> From: Ramkumar Ramachandra <artagnon@gmail.com>\n> Date: Tue, 2 Oct 2012 20:37:13 +0530\n> Subject: [PATCH] Documentation: mention `push.default` in git-push.txt\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Documentation/git-push.txt | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n> index cb97cc1..8751b38 100644\n> --- a/Documentation/git-push.txt\n> +++ b/Documentation/git-push.txt\n> @@ -37,7 +37,8 @@ OPTIONS[[OPTIONS]]\n>         `+`, followed by the source ref <src>, followed\n>         by a colon `:`, followed by the destination ref <dst>.\n>         It is used to specify with what <src> object the <dst> ref\n> -       in the remote repository is to be updated.\n> +       in the remote repository is to be updated.  If not specified,\n> +       the configuration variable `push.default` is used.\n>  +\n>  The <src> is often the name of the branch you would want to push, but\n>  it can be any arbitrary \"SHA-1 expression\", such as `master~4` or\n> --\n> 1.7.12.1.428.g652398a.dirty\n\n\n\n-- \nglasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/\n"},{"id":"200330","messageId":"CALkWK0nQu_vvLGu=j2CDkGcKtp-T401kDyhD5_iMqQrkGk9K8Q@mail.gmail.com","threadId":"31706","inReplyTo":"CAN7QDoJ=PKt_1zW58648tcaT7MP1MTVJo9E4PW5g93K_tO91Jw@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-02T15:38:00Z","receivedAt":"2012-10-02T15:38:00Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"David Glasser wrote:\n> Thanks Rankumar! There's also the reference in the \"git push origin\"\n> example and the \"This is the default operation mode if no explicit\n> refspec is found\".\n\nSorry;  here's a revised patch.\n\n--8<--\nFrom: Ramkumar Ramachandra <artagnon@gmail.com>\nDate: Tue, 2 Oct 2012 21:06:05 +0530\nSubject: [PATCH] Documentation: mention `push.default` in git-push.txt\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-push.txt | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex cb97cc1..e1e9aca 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -37,7 +37,8 @@ OPTIONS[[OPTIONS]]\n        `+`, followed by the source ref <src>, followed\n        by a colon `:`, followed by the destination ref <dst>.\n        It is used to specify with what <src> object the <dst> ref\n-       in the remote repository is to be updated.\n+       in the remote repository is to be updated.  If not specified,\n+       the configuration variable `push.default` is used.\n +\n The <src> is often the name of the branch you would want to push, but\n it can be any arbitrary \"SHA-1 expression\", such as `master~4` or\n@@ -65,7 +66,8 @@ directs git to push \"matching\" branches: for every\nbranch that\n the local side, the remote side is updated if a branch of the same name\n already exists on the remote side.  This is the default operation mode\n if no explicit refspec is found (that is neither on the command line\n-nor in any Push line of the corresponding remotes file---see below).\n+nor in any Push line of the corresponding remotes file, or `push.default`\n+---see below).\n\n --all::\n        Instead of naming each ref to push, specifies that all\n@@ -357,7 +359,7 @@ Examples\n        `git push origin :`.\n +\n The default behavior of this command when no <refspec> is given can be\n-configured by setting the `push` option of the remote.\n+configured by setting the `push` option of the remote, or `push.default`.\n +\n For example, to default to pushing only the current branch to `origin`\n use `git config remote.origin.push HEAD`.  Any valid <refspec> (like\n-- \n1.7.12.1.428.g652398a.dirty\n"},{"id":"200336","messageId":"vpqwqz89617.fsf@grenoble-inp.fr","threadId":"31706","inReplyTo":"CALkWK0nQu_vvLGu=j2CDkGcKtp-T401kDyhD5_iMqQrkGk9K8Q@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-10-02T16:45:40Z","receivedAt":"2012-10-02T16:45:40Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> David Glasser wrote:\n>> Thanks Rankumar! There's also the reference in the \"git push origin\"\n>> example and the \"This is the default operation mode if no explicit\n>> refspec is found\".\n>\n> Sorry;  here's a revised patch.\n\nSounds good, thanks (resend and Cc Junio if needed).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"200343","messageId":"CALkWK0nA3mCk1dFoR7XXn3DOn=KauvFCzT3-skWMpzcxujiXOw@mail.gmail.com","threadId":"31706","inReplyTo":"vpqwqz89617.fsf@grenoble-inp.fr","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-02T16:56:40Z","receivedAt":"2012-10-02T16:56:40Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Matthieu Moy wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n>> David Glasser wrote:\n>>> Thanks Rankumar! There's also the reference in the \"git push origin\"\n>>> example and the \"This is the default operation mode if no explicit\n>>> refspec is found\".\n>>\n>> Sorry;  here's a revised patch.\n>\n> Sounds good, thanks (resend and Cc Junio if needed).\n\n+CC: Junio\nPlease add a Reported-by: David Glasser <glasser@davidglasser.net>\n\nRam\n"},{"id":"200346","messageId":"7v8vboaiy2.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"vpqwqz89617.fsf@grenoble-inp.fr","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-02T17:21:25Z","receivedAt":"2012-10-02T17:21:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n>> David Glasser wrote:\n>>> Thanks Rankumar! There's also the reference in the \"git push origin\"\n>>> example and the \"This is the default operation mode if no explicit\n>>> refspec is found\".\n>>\n>> Sorry;  here's a revised patch.\n>\n> Sounds good, thanks (resend and Cc Junio if needed).\n\nThat's an Ack?\n"},{"id":"200348","messageId":"vpqa9w49468.fsf@grenoble-inp.fr","threadId":"31706","inReplyTo":"7v8vboaiy2.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-10-02T17:25:51Z","receivedAt":"2012-10-02T17:25:51Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n>\n>> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>>\n>>> David Glasser wrote:\n>>>> Thanks Rankumar! There's also the reference in the \"git push origin\"\n>>>> example and the \"This is the default operation mode if no explicit\n>>>> refspec is found\".\n>>>\n>>> Sorry;  here's a revised patch.\n>>\n>> Sounds good, thanks (resend and Cc Junio if needed).\n>\n> That's an Ack?\n\nYes.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"200353","messageId":"7vbogk90zk.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CALkWK0nQu_vvLGu=j2CDkGcKtp-T401kDyhD5_iMqQrkGk9K8Q@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-02T18:34:39Z","receivedAt":"2012-10-02T18:34:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> David Glasser wrote:\n>> Thanks Rankumar! There's also the reference in the \"git push origin\"\n>> example and the \"This is the default operation mode if no explicit\n>> refspec is found\".\n>\n> Sorry;  here's a revised patch.\n>\n> --8<--\n\nFYI: the above is not a scissors line.\n\n> From: Ramkumar Ramachandra <artagnon@gmail.com>\n> Date: Tue, 2 Oct 2012 21:06:05 +0530\n> Subject: [PATCH] Documentation: mention `push.default` in git-push.txt\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Documentation/git-push.txt | 8 +++++---\n>  1 file changed, 5 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n> index cb97cc1..e1e9aca 100644\n> --- a/Documentation/git-push.txt\n> +++ b/Documentation/git-push.txt\n> @@ -37,7 +37,8 @@ OPTIONS[[OPTIONS]]\n>         `+`, followed by the source ref <src>, followed\n>         by a colon `:`, followed by the destination ref <dst>.\n>         It is used to specify with what <src> object the <dst> ref\n> -       in the remote repository is to be updated.\n> +       in the remote repository is to be updated.  If not specified,\n> +       the configuration variable `push.default` is used.\n\nI think this is way suboptimal; it is begging users to do this\n\n\t[push]\n\t\tdefault = frotz:xyzzy\n\nby making it sound as if push.default gives a default for <refs>.\n\n> @@ -65,7 +66,8 @@ directs git to push \"matching\" branches: for every\n> branch that\n>  the local side, the remote side is updated if a branch of the same name\n>  already exists on the remote side.  This is the default operation mode\n>  if no explicit refspec is found (that is neither on the command line\n> -nor in any Push line of the corresponding remotes file---see below).\n> +nor in any Push line of the corresponding remotes file, or `push.default`\n> +---see below).\n\nLikewise.  The added part should not be inside the parentheses,\nwhich is about what the value used for refspec.  `push.default` is\nabout what happens when there is _no_ refspec.\n\nI'll queue this instead.  Thanks.\n\n-- >8 --\nFrom: Ramkumar Ramachandra <artagnon@gmail.com>\nDate: Tue, 2 Oct 2012 21:08:00 +0530\nSubject: [PATCH] Documentation: mention `push.default` in git-push.txt\n\nIt already is listed in the \"git config\" documentation, but people\ninterested in pushing would first look at \"git push\" documentation.\n\nNoticed-by: David Glasser\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\nAcked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>\nFixed-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-push.txt | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex cb97cc1..70b18bc 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -37,7 +37,9 @@ OPTIONS[[OPTIONS]]\n \t`+`, followed by the source ref <src>, followed\n \tby a colon `:`, followed by the destination ref <dst>.\n \tIt is used to specify with what <src> object the <dst> ref\n-\tin the remote repository is to be updated.\n+\tin the remote repository is to be updated.  If not specified,\n+\tthe behavior of the command is controled by the `push.default`\n+\tconfiguration variable.\n +\n The <src> is often the name of the branch you would want to push, but\n it can be any arbitrary \"SHA-1 expression\", such as `master~4` or\n@@ -65,7 +67,8 @@ directs git to push \"matching\" branches: for every branch that exists on\n the local side, the remote side is updated if a branch of the same name\n already exists on the remote side.  This is the default operation mode\n if no explicit refspec is found (that is neither on the command line\n-nor in any Push line of the corresponding remotes file---see below).\n+nor in any Push line of the corresponding remotes file---see below) and\n+no `push.default` configuration variable is set.\n \n --all::\n \tInstead of naming each ref to push, specifies that all\n@@ -357,7 +360,8 @@ Examples\n \t`git push origin :`.\n +\n The default behavior of this command when no <refspec> is given can be\n-configured by setting the `push` option of the remote.\n+configured by setting the `push` option of the remote, or the `push.default`\n+configuration variable.\n +\n For example, to default to pushing only the current branch to `origin`\n use `git config remote.origin.push HEAD`.  Any valid <refspec> (like\n-- \n1.8.0.rc0.45.g7ce8dc5\n"},{"id":"200356","messageId":"CAN7QDoLD+igYqVCgtKQsnW7f1Ntpk-RyaP8cn24cBrMjOO6NEg@mail.gmail.com","threadId":"31706","inReplyTo":"7vbogk90zk.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"David Glasser","fromEmail":"glasser@davidglasser.net","sentAt":"2012-10-02T19:00:48Z","receivedAt":"2012-10-02T19:00:48Z","isPatch":false,"sender":{"key":"glasser@davidglasser.net","avatar":"https://avatars.githubusercontent.com/u/16724?v=4"},"body":"Thanks Junio! Note that I think the word is usually spelled\n\"controlled\" not \"controled\".\n\nOn Tue, Oct 2, 2012 at 11:34 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n>> David Glasser wrote:\n>>> Thanks Rankumar! There's also the reference in the \"git push origin\"\n>>> example and the \"This is the default operation mode if no explicit\n>>> refspec is found\".\n>>\n>> Sorry;  here's a revised patch.\n>>\n>> --8<--\n>\n> FYI: the above is not a scissors line.\n>\n>> From: Ramkumar Ramachandra <artagnon@gmail.com>\n>> Date: Tue, 2 Oct 2012 21:06:05 +0530\n>> Subject: [PATCH] Documentation: mention `push.default` in git-push.txt\n>>\n>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n>> ---\n>>  Documentation/git-push.txt | 8 +++++---\n>>  1 file changed, 5 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n>> index cb97cc1..e1e9aca 100644\n>> --- a/Documentation/git-push.txt\n>> +++ b/Documentation/git-push.txt\n>> @@ -37,7 +37,8 @@ OPTIONS[[OPTIONS]]\n>>         `+`, followed by the source ref <src>, followed\n>>         by a colon `:`, followed by the destination ref <dst>.\n>>         It is used to specify with what <src> object the <dst> ref\n>> -       in the remote repository is to be updated.\n>> +       in the remote repository is to be updated.  If not specified,\n>> +       the configuration variable `push.default` is used.\n>\n> I think this is way suboptimal; it is begging users to do this\n>\n>         [push]\n>                 default = frotz:xyzzy\n>\n> by making it sound as if push.default gives a default for <refs>.\n>\n>> @@ -65,7 +66,8 @@ directs git to push \"matching\" branches: for every\n>> branch that\n>>  the local side, the remote side is updated if a branch of the same name\n>>  already exists on the remote side.  This is the default operation mode\n>>  if no explicit refspec is found (that is neither on the command line\n>> -nor in any Push line of the corresponding remotes file---see below).\n>> +nor in any Push line of the corresponding remotes file, or `push.default`\n>> +---see below).\n>\n> Likewise.  The added part should not be inside the parentheses,\n> which is about what the value used for refspec.  `push.default` is\n> about what happens when there is _no_ refspec.\n>\n> I'll queue this instead.  Thanks.\n>\n> -- >8 --\n> From: Ramkumar Ramachandra <artagnon@gmail.com>\n> Date: Tue, 2 Oct 2012 21:08:00 +0530\n> Subject: [PATCH] Documentation: mention `push.default` in git-push.txt\n>\n> It already is listed in the \"git config\" documentation, but people\n> interested in pushing would first look at \"git push\" documentation.\n>\n> Noticed-by: David Glasser\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>\n> Fixed-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/git-push.txt | 10 +++++++---\n>  1 file changed, 7 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n> index cb97cc1..70b18bc 100644\n> --- a/Documentation/git-push.txt\n> +++ b/Documentation/git-push.txt\n> @@ -37,7 +37,9 @@ OPTIONS[[OPTIONS]]\n>         `+`, followed by the source ref <src>, followed\n>         by a colon `:`, followed by the destination ref <dst>.\n>         It is used to specify with what <src> object the <dst> ref\n> -       in the remote repository is to be updated.\n> +       in the remote repository is to be updated.  If not specified,\n> +       the behavior of the command is controled by the `push.default`\n> +       configuration variable.\n>  +\n>  The <src> is often the name of the branch you would want to push, but\n>  it can be any arbitrary \"SHA-1 expression\", such as `master~4` or\n> @@ -65,7 +67,8 @@ directs git to push \"matching\" branches: for every branch that exists on\n>  the local side, the remote side is updated if a branch of the same name\n>  already exists on the remote side.  This is the default operation mode\n>  if no explicit refspec is found (that is neither on the command line\n> -nor in any Push line of the corresponding remotes file---see below).\n> +nor in any Push line of the corresponding remotes file---see below) and\n> +no `push.default` configuration variable is set.\n>\n>  --all::\n>         Instead of naming each ref to push, specifies that all\n> @@ -357,7 +360,8 @@ Examples\n>         `git push origin :`.\n>  +\n>  The default behavior of this command when no <refspec> is given can be\n> -configured by setting the `push` option of the remote.\n> +configured by setting the `push` option of the remote, or the `push.default`\n> +configuration variable.\n>  +\n>  For example, to default to pushing only the current branch to `origin`\n>  use `git config remote.origin.push HEAD`.  Any valid <refspec> (like\n> --\n> 1.8.0.rc0.45.g7ce8dc5\n>\n\n\n\n-- \nglasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/\n"},{"id":"200358","messageId":"7vtxuc7kvh.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CAN7QDoLD+igYqVCgtKQsnW7f1Ntpk-RyaP8cn24cBrMjOO6NEg@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-02T19:08:02Z","receivedAt":"2012-10-02T19:08:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Glasser <glasser@davidglasser.net> writes:\n\n> Thanks Junio! Note that I think the word is usually spelled\n> \"controlled\" not \"controled\".\n\nThanks; I cannot spelll...\n"},{"id":"200388","messageId":"vpqhaqc6ldr.fsf@grenoble-inp.fr","threadId":"31706","inReplyTo":"7vbogk90zk.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-10-03T07:54:40Z","receivedAt":"2012-10-03T07:54:40Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I'll queue this instead.  Thanks.\n\nEven better, perfect!\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"200391","messageId":"CACsJy8B7Z4kVYax4igYQ-d8q6e+GrPL3UwzhHSYbJ5Qo0TiL-w@mail.gmail.com","threadId":"31706","inReplyTo":"CALkWK0mxLQNOE8kZUJrxYQMWXpzZW0uS+N2iGXxdRmCXTzYcBQ@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-03T08:14:40Z","receivedAt":"2012-10-03T08:14:40Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Oct 2, 2012 at 10:09 PM, Ramkumar Ramachandra\n<artagnon@gmail.com> wrote:\n> David Glasser wrote:\n>> Is the newish push.default documented in the \"git push\" manpage\n>> anywhere? I don't see it mentioned (and there are several references\n>> to the \"default\" behavior), but maybe I'm missing something. Is it\n>> left out on purpose (ie, config values aren't supposed to be mentioned\n>> in command manpages)?\n>\n> You're right.  It's documented in `man git-config`, but we should\n> probably mention it in the `git-push` manpage.\n\nYour patch is fine. I'm just thinking whether it's a good idea to add\na section in the end of each command's man page to list all relevant\nconfig keys to that command, somewhat similar to \"see also\" section.\nIt may help finding useful config keys that otherwise hard to find.\n-- \nDuy\n"},{"id":"200392","messageId":"CALkWK0kKzt8ii-+O0zRM1JLenP+XKh-2Wv_v6zXkkcvTGQ2MQg@mail.gmail.com","threadId":"31706","inReplyTo":"CACsJy8B7Z4kVYax4igYQ-d8q6e+GrPL3UwzhHSYbJ5Qo0TiL-w@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-03T08:17:23Z","receivedAt":"2012-10-03T08:17:23Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Duy,\n\nNguyen Thai Ngoc Duy wrote:\n> Your patch is fine. I'm just thinking whether it's a good idea to add\n> a section in the end of each command's man page to list all relevant\n> config keys to that command, somewhat similar to \"see also\" section.\n> It may help finding useful config keys that otherwise hard to find.\n\nThat sounds like a good idea.  Would you like to write the first patch\n(for git-push)?\n\nRam\n"},{"id":"200394","messageId":"CACsJy8BB4WM1Lqz4yCGnGN2DV1Xsip3Qzh86ibBXwt2BnaNENA@mail.gmail.com","threadId":"31706","inReplyTo":"CALkWK0kKzt8ii-+O0zRM1JLenP+XKh-2Wv_v6zXkkcvTGQ2MQg@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-03T08:23:35Z","receivedAt":"2012-10-03T08:23:35Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Oct 3, 2012 at 3:17 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> Hi Duy,\n>\n> Nguyen Thai Ngoc Duy wrote:\n>> Your patch is fine. I'm just thinking whether it's a good idea to add\n>> a section in the end of each command's man page to list all relevant\n>> config keys to that command, somewhat similar to \"see also\" section.\n>> It may help finding useful config keys that otherwise hard to find.\n>\n> That sounds like a good idea.  Would you like to write the first patch\n> (for git-push)?\n\nI won't be able to do it in the next 4 hours. If you want a stab at\nit, go ahead.\n-- \nDuy\n"},{"id":"200396","messageId":"CALkWK0=N0OwTyu1KDAKzM48ioevGtmMNgy5gfK2J78zSPx7CVA@mail.gmail.com","threadId":"31706","inReplyTo":"CACsJy8BB4WM1Lqz4yCGnGN2DV1Xsip3Qzh86ibBXwt2BnaNENA@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-03T08:46:04Z","receivedAt":"2012-10-03T08:46:04Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"[+CC: Junio, for comments]\n\nNguyen Thai Ngoc Duy wrote:\n> On Wed, Oct 3, 2012 at 3:17 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n>> Hi Duy,\n>>\n>> Nguyen Thai Ngoc Duy wrote:\n>>> Your patch is fine. I'm just thinking whether it's a good idea to add\n>>> a section in the end of each command's man page to list all relevant\n>>> config keys to that command, somewhat similar to \"see also\" section.\n>>> It may help finding useful config keys that otherwise hard to find.\n>>\n>> That sounds like a good idea.  Would you like to write the first patch\n>> (for git-push)?\n>\n> I won't be able to do it in the next 4 hours. If you want a stab at\n> it, go ahead.\n\nOn second thought, it might not be such a good idea.  There are *lots*\nof variables that control the operation of each command, and it's hard\nto decide which ones to list and which ones to omit.  I've listed all\nthe relevant variables for git-push, except the advice.* variables- I\ndon't know how useful such a long list might be.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n\n-- 8< --\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex cb97cc1..0a1c8d2 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -426,6 +426,30 @@ Commits A and B would no longer belong to a\nbranch with a symbolic name,\n and so would be unreachable.  As such, these commits would be removed by\n a `git gc` command on the origin repository.\n\n+Configuration variables\n+-----------------------\n+\n+These configuration variables affect the operation of git-push in\n+various ways.  For more information see linkgit:git-config[1].\n+\n+branch.<name>.remote\n+core.gitProxy\n+http.proxy\n+push.default\n+receive.autogc\n+receive.denyCurrentBranch\n+receive.denyDeleteCurrent\n+receive.denyDeletes\n+receive.denyNonFastForwards\n+receive.unpackLimit\n+receive.updateserverinfo\n+remote.<name>.mirror\n+remote.<name>.proxy\n+remote.<name>.push\n+remote.<name>.pushurl\n+remote.<name>.receivepack\n+remote.<name>.url\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n"},{"id":"200397","messageId":"CALkWK0n2o64K4wHDGiHjEcC3BEkoT1tmbhS5=zYzJzwKyAUJvg@mail.gmail.com","threadId":"31706","inReplyTo":"7vbogk90zk.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-03T08:52:39Z","receivedAt":"2012-10-03T08:52:39Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>> [...]\n>> --8<--\n>\n> FYI: the above is not a scissors line.\n\nExcerpt from git-mailinfo[1]:\n\n--scissors::\n\tRemove everything in body before a scissors line.  A line that\n\tmainly consists of scissors (either \">8\" or \"8<\") and perforation\n\t(dash \"-\") marks is called a scissors line, and is used to request\n\tthe reader to cut the message at that line.  If such a line\n\tappears in the body of the message before the patch, everything\n\tbefore it (including the scissors line itself) is ignored when\n\tthis option is used.\n\nDoes it need to be updated to say that a space is required between the\nperforation and the scissors?\n\nRam\n"},{"id":"200399","messageId":"CACsJy8APN-CdBZgLzuNWAa5ArR2gkcStY4GZ=79fU7sGT9pOMw@mail.gmail.com","threadId":"31706","inReplyTo":"CALkWK0=N0OwTyu1KDAKzM48ioevGtmMNgy5gfK2J78zSPx7CVA@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-03T10:18:24Z","receivedAt":"2012-10-03T10:18:24Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Oct 3, 2012 at 3:46 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> On second thought, it might not be such a good idea.  There are *lots*\n> of variables that control the operation of each command, and it's hard\n> to decide which ones to list and which ones to omit.  I've listed all\n> the relevant variables for git-push, except the advice.* variables- I\n> don't know how useful such a long list might be.\n\nI think listing receive.* and advice.* (and maybe even\nremove.<name>.*) is still ok. The goal is to give users a clue.\nThey'll need to look up in config.txt anyway for explanation. If we\nname the config keys (and groups) well then users should be able to\nguess what those keys may be for before deciding whether to look into\ndetails.\n-- \nDuy\n"},{"id":"200405","messageId":"alpine.DEB.2.00.1210031257520.12017@ds9.cixit.se","threadId":"31706","inReplyTo":"CACsJy8B7Z4kVYax4igYQ-d8q6e+GrPL3UwzhHSYbJ5Qo0TiL-w@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2012-10-03T11:58:45Z","receivedAt":"2012-10-03T11:58:45Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Nguyen Thai Ngoc Duy:\n\n> I'm just thinking whether it's a good idea to add a section in the \n> end of each command's man page to list all relevant config keys to \n> that command, somewhat similar to \"see also\" section.\n\nYes, please. Discoverability of configuration settings is not very \ngood at the moment.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"200440","messageId":"7v7gr75s40.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CACsJy8APN-CdBZgLzuNWAa5ArR2gkcStY4GZ=79fU7sGT9pOMw@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-03T18:26:55Z","receivedAt":"2012-10-03T18:26:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> On Wed, Oct 3, 2012 at 3:46 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n>> On second thought, it might not be such a good idea.  There are *lots*\n>> of variables that control the operation of each command, and it's hard\n>> to decide which ones to list and which ones to omit.  I've listed all\n>> the relevant variables for git-push, except the advice.* variables- I\n>> don't know how useful such a long list might be.\n>\n> I think listing receive.* and advice.* (and maybe even\n> remove.<name>.*) is still ok. The goal is to give users a clue.\n> They'll need to look up in config.txt anyway for explanation. If we\n> name the config keys (and groups) well then users should be able to\n> guess what those keys may be for before deciding whether to look into\n> details.\n\nPlease do not label the list as \"These variables affect this\ncommand\" to give a false impression that it is the complete list if\nit isn't.\n\nUnless somebody promises to keep an up-to-date complete list there\n(or even better, come up with a mechanism to help us keep that\npromise automatically, perhaps by annotating pieces with structured\ncomments in config.txt and automatically appending such a section to\nmanual pages of relevant commands), that is.\n\nWith a weaker phrase, e.g. \"These configuration variables may be of\ninterest\", such a list may not hurt readers, but personally I do not\nthink it adds much value to have a list of variables without even a\nsingle line description of what each is used for.\n"},{"id":"200442","messageId":"7vvcer4chm.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CACsJy8APN-CdBZgLzuNWAa5ArR2gkcStY4GZ=79fU7sGT9pOMw@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-03T18:49:41Z","receivedAt":"2012-10-03T18:49:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> On Wed, Oct 3, 2012 at 3:46 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n>> On second thought, it might not be such a good idea.  There are *lots*\n>> of variables that control the operation of each command, and it's hard\n>> to decide which ones to list and which ones to omit.  I've listed all\n>> the relevant variables for git-push, except the advice.* variables- I\n>> don't know how useful such a long list might be.\n>\n> I think listing receive.* and advice.* (and maybe even\n> remove.<name>.*) is still ok. The goal is to give users a clue.\n> They'll need to look up in config.txt anyway for explanation. If we\n> name the config keys (and groups) well then users should be able to\n> guess what those keys may be for before deciding whether to look into\n> details.\n\nI would recommend against listing any advice.* in the command manual\npages.  They are meant to give an advice in cases that are often\nconfusing to new people and are supposed to advise how to turn it\noff in the message.  We want users to see them and understand the\nsituation, and more importantly, we want to strongly discourage\nusers to decline them until seeing them and understand what they\nadvise for or against.\n"},{"id":"200460","messageId":"20121003214051.GD4484@sigill.intra.peff.net","threadId":"31706","inReplyTo":"7v7gr75s40.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-10-03T21:40:51Z","receivedAt":"2012-10-03T21:40:51Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 03, 2012 at 11:26:55AM -0700, Junio C Hamano wrote:\n\n> Please do not label the list as \"These variables affect this\n> command\" to give a false impression that it is the complete list if\n> it isn't.\n> \n> Unless somebody promises to keep an up-to-date complete list there\n> (or even better, come up with a mechanism to help us keep that\n> promise automatically, perhaps by annotating pieces with structured\n> comments in config.txt and automatically appending such a section to\n> manual pages of relevant commands), that is.\n>\n> With a weaker phrase, e.g. \"These configuration variables may be of\n> interest\", such a list may not hurt readers, but personally I do not\n> think it adds much value to have a list of variables without even a\n> single line description of what each is used for.\n\nWe talked a while ago about actually moving the config options into the\nindividual manpages, and generating config.txt to simply contain an\nindex of keys and where their definitions may be found. That also has\nthe \"list without description\" characteristic. But presumably you would\nbe looking for keys in the manual of the command you want to affect, and\nthe master list would mostly be for redirecting you to the right\nmanpage.\n\nIt does break down a little when you have keys that could go in multiple\npages. In many cases, this can be solved by a canonical location that\ndescribes the shared concepts. For example, `diff.*` should probably go\ninto a `gitdiff(7)` that talks about the various diff options and\nformats.\n\nOf course, that only works if you think pulling out the shared diff bits\nfrom git-diff*, git-log, etc into a separate manpage is a good idea. I\ndo, because I think it makes it more clear to the reader how the\nconcepts connect (as opposed to simply including shared bits inline in\nthe manpages, as we do now, with no indication that the same content is\ngoing to apply in many places). But it does have a downside that\nindividual manpages are not as easily searchable via the pager, as you\nmay have to follow a cross-reference to find what you want.\n\n-Peff\n"},{"id":"200479","messageId":"CACsJy8D5TCP+77NObD7Q58k6OKQhbZKU-i4tb2RX40xj5CPsgw@mail.gmail.com","threadId":"31706","inReplyTo":"7vvcer4chm.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-04T02:01:18Z","receivedAt":"2012-10-04T02:01:18Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Oct 4, 2012 at 1:49 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> I would recommend against listing any advice.* in the command manual\n> pages.  They are meant to give an advice in cases that are often\n> confusing to new people and are supposed to advise how to turn it\n> off in the message.\n\nOK. I think I was surprised that some messages were controlled by\nadvice.* but gave no hints about that and I found that out by other\nmeans. I'll check all the advice messages.\n-- \nDuy\n"},{"id":"200468","messageId":"7va9w23i45.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CACsJy8D5TCP+77NObD7Q58k6OKQhbZKU-i4tb2RX40xj5CPsgw@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-04T05:45:46Z","receivedAt":"2012-10-04T05:45:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> On Thu, Oct 4, 2012 at 1:49 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> I would recommend against listing any advice.* in the command manual\n>> pages.  They are meant to give an advice in cases that are often\n>> confusing to new people and are supposed to advise how to turn it\n>> off in the message.\n>\n> OK. I think I was surprised that some messages were controlled by\n> advice.* but gave no hints about that and I found that out by other\n> means. I'll check all the advice messages.\n\nAs far as I can tell,\n\n    $ git grep -e 'advice\\.' Documentation\n\nshows the list in config.txt and nothing else, and they do talk\nabout when they are issued, but the reasoning behind them may not be\ndescribed to a sufficient degree (that is, unless a reader carefully\nthinks things through, s/he may not be able to figure out why).  But\nI think what we have there is more or less OK.\n"},{"id":"200588","messageId":"CACsJy8BeWuKT_jUyRYf3cKrp7Jx07J2jPEZd96KbWEY+aiX24w@mail.gmail.com","threadId":"31706","inReplyTo":"7va9w23i45.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-05T06:34:47Z","receivedAt":"2012-10-05T06:34:47Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Oct 4, 2012 at 12:45 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n>\n>> On Thu, Oct 4, 2012 at 1:49 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> I would recommend against listing any advice.* in the command manual\n>>> pages.  They are meant to give an advice in cases that are often\n>>> confusing to new people and are supposed to advise how to turn it\n>>> off in the message.\n>>\n>> OK. I think I was surprised that some messages were controlled by\n>> advice.* but gave no hints about that and I found that out by other\n>> means. I'll check all the advice messages.\n>\n> As far as I can tell,\n>\n>     $ git grep -e 'advice\\.' Documentation\n>\n> shows the list in config.txt and nothing else, and they do talk\n> about when they are issued, but the reasoning behind them may not be\n> described to a sufficient degree (that is, unless a reader carefully\n> thinks things through, s/he may not be able to figure out why).  But\n> I think what we have there is more or less OK.\n\nIt's about the commands, not the documents. For example I had no idea\nI could set advice.statusHints to turn off some advice. \"git status\"\ndoes not say that those messages can be turned off.\n-- \nDuy\n"},{"id":"200636","messageId":"7vmx00u1nz.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CACsJy8BeWuKT_jUyRYf3cKrp7Jx07J2jPEZd96KbWEY+aiX24w@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-05T20:03:28Z","receivedAt":"2012-10-05T20:03:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> On Thu, Oct 4, 2012 at 12:45 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n>>\n>>> On Thu, Oct 4, 2012 at 1:49 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>> I would recommend against listing any advice.* in the command manual\n>>>> pages.  They are meant to give an advice in cases that are often\n>>>> confusing to new people and are supposed to advise how to turn it\n>>>> off in the message.\n>>>\n>>> OK. I think I was surprised that some messages were controlled by\n>>> advice.* but gave no hints about that and I found that out by other\n>>> means. I'll check all the advice messages.\n>>\n>> As far as I can tell,\n>>\n>>     $ git grep -e 'advice\\.' Documentation\n>>\n>> shows the list in config.txt and nothing else, and they do talk\n>> about when they are issued, but the reasoning behind them may not be\n>> described to a sufficient degree (that is, unless a reader carefully\n>> thinks things through, s/he may not be able to figure out why).  But\n>> I think what we have there is more or less OK.\n>\n> It's about the commands, not the documents. For example I had no idea\n> I could set advice.statusHints to turn off some advice. \"git status\"\n> does not say that those messages can be turned off.\n\nOK, the messages are supposed to advise how to turn them off, so we\nwould want some code updates in that case.\n"},{"id":"200701","messageId":"CALkWK0m0ZzOmwFxAt40gHXi98JEq+==9ctiLYVYf4UE5GB+V8A@mail.gmail.com","threadId":"31706","inReplyTo":"7v7gr75s40.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-07T16:09:48Z","receivedAt":"2012-10-07T16:09:48Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n>\n>> On Wed, Oct 3, 2012 at 3:46 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n>>> On second thought, it might not be such a good idea.  There are *lots*\n>>> of variables that control the operation of each command, and it's hard\n>>> to decide which ones to list and which ones to omit.  I've listed all\n>>> the relevant variables for git-push, except the advice.* variables- I\n>>> don't know how useful such a long list might be.\n>>\n>> I think listing receive.* and advice.* (and maybe even\n>> remove.<name>.*) is still ok. The goal is to give users a clue.\n>> They'll need to look up in config.txt anyway for explanation. If we\n>> name the config keys (and groups) well then users should be able to\n>> guess what those keys may be for before deciding whether to look into\n>> details.\n>\n> Please do not label the list as \"These variables affect this\n> command\" to give a false impression that it is the complete list if\n> it isn't.\n>\n> Unless somebody promises to keep an up-to-date complete list there\n> (or even better, come up with a mechanism to help us keep that\n> promise automatically, perhaps by annotating pieces with structured\n> comments in config.txt and automatically appending such a section to\n> manual pages of relevant commands), that is.\n>\n> With a weaker phrase, e.g. \"These configuration variables may be of\n> interest\", such a list may not hurt readers, but personally I do not\n> think it adds much value to have a list of variables without even a\n> single line description of what each is used for.\n\nOkay.  Does this work?\n\n-- 8< --\nFrom: Ramkumar Ramachandra <artagnon@gmail.com>\nDate: Sun, 7 Oct 2012 17:24:36 +0530\nSubject: [PATCH] Documentation/git-push: add a configuration variables\n section\n\nThe list of configuration variables that affect the operation of a git\ncommand can often be hard to find.  As a first step, add a\n\"Configuration variables\" section to git-push.  The intent is to\ncreate similar sections in all manpages.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-push.txt | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex cb97cc1..a125536 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -426,6 +426,30 @@ Commits A and B would no longer belong to a\nbranch with a sy\n and so would be unreachable.  As such, these commits would be removed by\n a `git gc` command on the origin repository.\n\n+Configuration variables\n+-----------------------\n+\n+These configuration variables may be of interest.  For more\n+information see linkgit:git-config[1].\n+\n+branch.<name>.remote\n+core.gitProxy\n+http.proxy\n+push.default\n+receive.autogc\n+receive.denyCurrentBranch\n+receive.denyDeleteCurrent\n+receive.denyDeletes\n+receive.denyNonFastForwards\n+receive.unpackLimit\n+receive.updateserverinfo\n+remote.<name>.mirror\n+remote.<name>.proxy\n+remote.<name>.push\n+remote.<name>.pushurl\n+remote.<name>.receivepack\n+remote.<name>.url\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n-- \n1.7.12.1.428.g652398a.dirty\n"},{"id":"200708","messageId":"7v7gr2qb7q.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"CALkWK0m0ZzOmwFxAt40gHXi98JEq+==9ctiLYVYf4UE5GB+V8A@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-07T20:27:37Z","receivedAt":"2012-10-07T20:27:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>>\n>> With a weaker phrase, e.g. \"These configuration variables may be of\n>> interest\", such a list may not hurt readers, but personally I do not\n>> think it adds much value to have a list of variables without even a\n>> single line description of what each is used for.\n>\n> Okay.  Does this work?\n\nHrm, is it useful without even a single line description of what\neach is used for?\n\nBesides, how does it appear in the formatted documents?  A thick\nparagraph that lists names of variables enumerated without comma in\nbetween?\n\n> -- 8< --\n> From: Ramkumar Ramachandra <artagnon@gmail.com>\n> Date: Sun, 7 Oct 2012 17:24:36 +0530\n> Subject: [PATCH] Documentation/git-push: add a configuration variables\n>  section\n>\n> The list of configuration variables that affect the operation of a git\n> command can often be hard to find.  As a first step, add a\n> \"Configuration variables\" section to git-push.  The intent is to\n> create similar sections in all manpages.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Documentation/git-push.txt | 24 ++++++++++++++++++++++++\n>  1 file changed, 24 insertions(+)\n>\n> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\n> index cb97cc1..a125536 100644\n> --- a/Documentation/git-push.txt\n> +++ b/Documentation/git-push.txt\n> @@ -426,6 +426,30 @@ Commits A and B would no longer belong to a\n> branch with a sy\n>  and so would be unreachable.  As such, these commits would be removed by\n>  a `git gc` command on the origin repository.\n>\n> +Configuration variables\n> +-----------------------\n> +\n> +These configuration variables may be of interest.  For more\n> +information see linkgit:git-config[1].\n> +\n> +branch.<name>.remote\n> +core.gitProxy\n> +http.proxy\n> +push.default\n> +receive.autogc\n> +receive.denyCurrentBranch\n> +receive.denyDeleteCurrent\n> +receive.denyDeletes\n> +receive.denyNonFastForwards\n> +receive.unpackLimit\n> +receive.updateserverinfo\n> +remote.<name>.mirror\n> +remote.<name>.proxy\n> +remote.<name>.push\n> +remote.<name>.pushurl\n> +remote.<name>.receivepack\n> +remote.<name>.url\n> +\n>  GIT\n>  ---\n>  Part of the linkgit:git[1] suite\n"},{"id":"200740","messageId":"CALkWK0=gYFuLBfWBiXcw=1Be9nYgRJgFSSDSbvwxPnttHqAFew@mail.gmail.com","threadId":"31706","inReplyTo":"7v7gr2qb7q.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-10-08T07:27:49Z","receivedAt":"2012-10-08T07:27:49Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n>> Junio C Hamano wrote:\n>>>\n>>> With a weaker phrase, e.g. \"These configuration variables may be of\n>>> interest\", such a list may not hurt readers, but personally I do not\n>>> think it adds much value to have a list of variables without even a\n>>> single line description of what each is used for.\n>>\n>> Okay.  Does this work?\n>\n> Hrm, is it useful without even a single line description of what\n> each is used for?\n\nShould we replicate the description from git-config[1]?  That seems\nlike a waste.\n\n> Besides, how does it appear in the formatted documents?  A thick\n> paragraph that lists names of variables enumerated without comma in\n> between?\n\nOops; I didn't build it and check.\n\nRam\n"},{"id":"200743","messageId":"CACsJy8B9V2xASOkTF8doORPMhOMYTkuCBk9395fESpg5Awoy-Q@mail.gmail.com","threadId":"31706","inReplyTo":"CALkWK0=gYFuLBfWBiXcw=1Be9nYgRJgFSSDSbvwxPnttHqAFew@mail.gmail.com","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-08T08:35:57Z","receivedAt":"2012-10-08T08:35:57Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Oct 8, 2012 at 2:27 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> Should we replicate the description from git-config[1]?  That seems\n> like a waste.\n\nI think Jeff's suggestion [1] of moving config bits from\ngit-config.txt to git-*.txt makes sense. But that seems a big task.\nWe'll need to figure out how to groups config keys in separate\nconfig-*.txt then include them in relevant commands' man page and\nconfig.txt (or just \"see also\" in config.txt). Maybe we can try it\nwith push config first?\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/206780/focus=206939\n-- \nDuy\n"},{"id":"200760","messageId":"7v8vbgnb19.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"20121003214051.GD4484@sigill.intra.peff.net","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-08T17:12:02Z","receivedAt":"2012-10-08T17:12:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Oct 03, 2012 at 11:26:55AM -0700, Junio C Hamano wrote:\n>\n>> Please do not label the list as \"These variables affect this\n>> command\" to give a false impression that it is the complete list if\n>> it isn't.\n>> \n>> Unless somebody promises to keep an up-to-date complete list there\n>> (or even better, come up with a mechanism to help us keep that\n>> promise automatically, perhaps by annotating pieces with structured\n>> comments in config.txt and automatically appending such a section to\n>> manual pages of relevant commands), that is.\n>>\n>> With a weaker phrase, e.g. \"These configuration variables may be of\n>> interest\", such a list may not hurt readers, but personally I do not\n>> think it adds much value to have a list of variables without even a\n>> single line description of what each is used for.\n>\n> We talked a while ago about actually moving the config options into the\n> individual manpages, and generating config.txt to simply contain an\n> index of keys and where their definitions may be found. That also has\n> the \"list without description\" characteristic. But presumably you would\n> be looking for keys in the manual of the command you want to affect, and\n> the master list would mostly be for redirecting you to the right\n> manpage.\n\nThat cuts both ways for configuration variables that affects or are\naffected by multiple commands, and that would range from the trivial\nexample of configuration variables for fetch and merge that appear\nto take effect in \"git pull\" from the end users' perspective, to the\nmore complex ones like remotes.*.merge and remotes.*.url that are\nset to make the @{upstream} notation work.\n\n> It does break down a little when you have keys that could go in multiple\n> pages. In many cases, this can be solved by a canonical location that\n> describes the shared concepts. For example, `diff.*` should probably go\n> into a `gitdiff(7)` that talks about the various diff options and\n> formats.\n>\n> Of course, that only works if you think pulling out the shared diff bits\n> from git-diff*, git-log, etc into a separate manpage is a good idea. I\n> do, because I think it makes it more clear to the reader how the\n> concepts connect (as opposed to simply including shared bits inline in\n> the manpages, as we do now, with no indication that the same content is\n> going to apply in many places). But it does have a downside that\n> individual manpages are not as easily searchable via the pager, as you\n> may have to follow a cross-reference to find what you want.\n\nI suspect that approach would make individual manual pages less\napproacheable by new people, as they will have more required\nreading.\n\ngit(1) currently guides people to user manual, and then points at\nindividual pages, assuming that these shared concepts (e.g. the one\nfor \"diff\" you discuss in the above paragraph) are fully mastered\nonce the user manual is read.  Perhaps we would need to replace it\nwith a \"concepts\" manual, or enhance it with more \"concepts\"\nmaterial?\n"},{"id":"200985","messageId":"20121011124326.GA30589@do","threadId":"31706","inReplyTo":"7vmx00u1nz.fsf@alter.siamese.dyndns.org","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-11T12:43:26Z","receivedAt":"2012-10-11T12:43:26Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Oct 05, 2012 at 01:03:28PM -0700, Junio C Hamano wrote:\n> >>> OK. I think I was surprised that some messages were controlled by\n> >>> advice.* but gave no hints about that and I found that out by other\n> >>> means. I'll check all the advice messages.\n> >\n> > It's about the commands, not the documents. For example I had no idea\n> > I could set advice.statusHints to turn off some advice. \"git status\"\n> > does not say that those messages can be turned off.\n> \n> OK, the messages are supposed to advise how to turn them off, so we\n> would want some code updates in that case.\n\nSomething like this? It turns out none of the advice messages says\nanything about advice.*.\n\nThis patch makes many output more verbose/annoying, (which is good,\nmore motivation to turn advice off). On the other hand, if a user sees\na message telling her/him to turn advice.statusHints off, (s)he may\nmiss other helpful advice as it turns the whole set off. I don't know\nif that is good or bad for newbies.\n\nTests are broken due to output changes. Will fix it if it may have a\nchance of entering git.git.\n\nThere are two advise() calls in sequencer.c that we may want to\ntrigger with a new advice config, by the way.\n\n-- 8< --\ndiff --git a/advice.c b/advice.c\nindex edfbd4a..5b78c01 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -70,7 +70,8 @@ int error_resolve_conflict(const char *me)\n \t\tadvise(_(\"Fix them up in the work tree,\\n\"\n \t\t\t \"and then use 'git add/rm <file>' as\\n\"\n \t\t\t \"appropriate to mark resolution and make a commit,\\n\"\n-\t\t\t \"or use 'git commit -a'.\"));\n+\t\t\t \"or use 'git commit -a'.\\n\"\n+\t\t\t \"Set advice.resolveConflict to false to turn off this message.\"));\n \treturn -1;\n }\n \n@@ -89,7 +90,9 @@ void detach_advice(const char *new_name)\n \t\"state without impacting any branches by performing another checkout.\\n\\n\"\n \t\"If you want to create a new branch to retain commits you create, you may\\n\"\n \t\"do so (now or later) by using -b with the checkout command again. Example:\\n\\n\"\n-\t\"  git checkout -b new_branch_name\\n\\n\";\n+\t\"  git checkout -b new_branch_name\\n\"\n+\t\"Set either advice.detachedHead to false to turn off this message\\n\\n\"\n+;\n \n \tfprintf(stderr, fmt, new_name);\n }\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 781295b..a805961 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -699,7 +699,9 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)\n \t\t\t_(\n \t\t\t\"If you want to keep them by creating a new branch, \"\n \t\t\t\"this may be a good time\\nto do so with:\\n\\n\"\n-\t\t\t\" git branch new_branch_name %s\\n\\n\"),\n+\t\t\t\" git branch new_branch_name %s\\n\"\n+\t\t\t\"Set either advice.detachedHead to false\"\n+\t\t\t\" to turn off this message\\n\\n\"),\n \t\t\tsha1_to_hex(commit->object.sha1));\n }\n \ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex a17a5df..5a4d85f 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -50,7 +50,8 @@ N_(\"Your name and email address were configured automatically based\\n\"\n \"\\n\"\n \"After doing this, you may fix the identity used for this commit with:\\n\"\n \"\\n\"\n-\"    git commit --amend --reset-author\\n\");\n+\"    git commit --amend --reset-author\\n\"\n+\"Set either advice.implicitIdentity to false to turn off this message\\n\");\n \n static const char empty_amend_advice[] =\n N_(\"You asked to amend the most recent commit, but doing so would make\\n\"\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 0ec8f0d..754f51e 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1227,14 +1227,18 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t */\n \t\tif (advice_resolve_conflict)\n \t\t\tdie(_(\"You have not concluded your merge (MERGE_HEAD exists).\\n\"\n-\t\t\t\t  \"Please, commit your changes before you can merge.\"));\n+\t\t\t      \"Please, commit your changes before you can merge.\\n\"\n+\t\t\t      \"Set advice.resolveConflict to false\"\n+\t\t\t      \" to turn off this message\\n\"));\n \t\telse\n \t\t\tdie(_(\"You have not concluded your merge (MERGE_HEAD exists).\"));\n \t}\n \tif (file_exists(git_path(\"CHERRY_PICK_HEAD\"))) {\n \t\tif (advice_resolve_conflict)\n \t\t\tdie(_(\"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\\n\"\n-\t\t\t    \"Please, commit your changes before you can merge.\"));\n+\t\t\t    \"Please, commit your changes before you can merge.\\n\"\n+\t\t\t      \"Set advice.resolveConflict to false\"\n+\t\t\t      \" to turn off this message\\n\"));\n \t\telse\n \t\t\tdie(_(\"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\"));\n \t}\ndiff --git a/builtin/push.c b/builtin/push.c\nindex db9ba30..420a17a 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -206,19 +206,25 @@ static const char message_advice_pull_before_push[] =\n \tN_(\"Updates were rejected because the tip of your current branch is behind\\n\"\n \t   \"its remote counterpart. Merge the remote changes (e.g. 'git pull')\\n\"\n \t   \"before pushing again.\\n\"\n-\t   \"See the 'Note about fast-forwards' in 'git push --help' for details.\");\n+\t   \"See the 'Note about fast-forwards' in 'git push --help' for details.\\n\"\n+\t   \"Set either advice.pushNonFFCurrent or advice.pushNonFostForward to false\\n\"\n+\t   \" to turn off this message\");\n \n static const char message_advice_use_upstream[] =\n \tN_(\"Updates were rejected because a pushed branch tip is behind its remote\\n\"\n \t   \"counterpart. If you did not intend to push that branch, you may want to\\n\"\n \t   \"specify branches to push or set the 'push.default' configuration variable\\n\"\n-\t   \"to 'simple', 'current' or 'upstream' to push only the current branch.\");\n+\t   \"to 'simple', 'current' or 'upstream' to push only the current branch.\\n\"\n+\t   \"Set either advice.pushNonFFDefault or advice.pushNonFostForward to false\\n\"\n+\t   \" to turn off this message\");\n \n static const char message_advice_checkout_pull_push[] =\n \tN_(\"Updates were rejected because a pushed branch tip is behind its remote\\n\"\n \t   \"counterpart. Check out this branch and merge the remote changes\\n\"\n \t   \"(e.g. 'git pull') before pushing again.\\n\"\n-\t   \"See the 'Note about fast-forwards' in 'git push --help' for details.\");\n+\t   \"See the 'Note about fast-forwards' in 'git push --help' for details.\\n\"\n+\t   \"Set either advice.pushNonFFMatching or advice.pushNonFostForward to false\\n\"\n+\t   \" to turn off this message\");\n \n static void advise_pull_before_push(void)\n {\ndiff --git a/notes-merge.c b/notes-merge.c\nindex 0f67bd3..601bf26 100644\n--- a/notes-merge.c\n+++ b/notes-merge.c\n@@ -273,7 +273,10 @@ static void check_notes_merge_worktree(struct notes_merge_options *o)\n \t\t\t\t    \"'git notes merge --commit' or 'git notes \"\n \t\t\t\t    \"merge --abort' to commit/abort the \"\n \t\t\t\t    \"previous merge before you start a new \"\n-\t\t\t\t    \"notes merge.\", git_path(\"NOTES_MERGE_*\"));\n+\t\t\t\t    \"notes merge.\\n\"\n+\t\t\t\t    \"Set advice.resolveConflict to false\"\n+\t\t\t\t    \" to turn off this message\",\n+\t\t\t\t    git_path(\"NOTES_MERGE_*\"));\n \t\t\telse\n \t\t\t\tdie(\"You have not concluded your notes merge \"\n \t\t\t\t    \"(%s exists).\", git_path(\"NOTES_MERGE_*\"));\ndiff --git a/sequencer.c b/sequencer.c\nindex e3723d2..489c97c 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -182,7 +182,8 @@ static int error_dirty_index(struct replay_opts *opts)\n \t\terror(_(\"Your local changes would be overwritten by revert.\"));\n \n \tif (advice_commit_before_merge)\n-\t\tadvise(_(\"Commit your changes or stash them to proceed.\"));\n+\t\tadvise(_(\"Commit your changes or stash them to proceed.\\n\"\n+\t\t\t \"Set advice.commitBeforeMerge to false to turn off this message.\"));\n \treturn -1;\n }\n \ndiff --git a/unpack-trees.c b/unpack-trees.c\nindex 6d96366..6c274bc 100644\n--- a/unpack-trees.c\n+++ b/unpack-trees.c\n@@ -60,7 +60,8 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,\n \tconst char *cmd2 = strcmp(cmd, \"checkout\") ? cmd : \"switch branches\";\n \tif (advice_commit_before_merge)\n \t\tmsg = \"Your local changes to the following files would be overwritten by %s:\\n%%s\"\n-\t\t\t\"Please, commit your changes or stash them before you can %s.\";\n+\t\t\t\"Please, commit your changes or stash them before you can %s.\\n\"\n+\t\t\t\"Set advice.commitBeforeMerge to false to turn off this message.\";\n \telse\n \t\tmsg = \"Your local changes to the following files would be overwritten by %s:\\n%%s\";\n \ttmp = xmalloc(strlen(msg) + strlen(cmd) + strlen(cmd2) - 2);\n@@ -73,7 +74,8 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,\n \n \tif (advice_commit_before_merge)\n \t\tmsg = \"The following untracked working tree files would be %s by %s:\\n%%s\"\n-\t\t\t\"Please move or remove them before you can %s.\";\n+\t\t\t\"Please move or remove them before you can %s.\\n\"\n+\t\t\t\"Set advice.commitBeforeMerge to false to turn off this message.\";\n \telse\n \t\tmsg = \"The following untracked working tree files would be %s by %s:\\n%%s\";\n \ttmp = xmalloc(strlen(msg) + strlen(cmd) + strlen(\"removed\") + strlen(cmd2) - 4);\ndiff --git a/wt-status.c b/wt-status.c\nindex 2a9658b..344f5f6 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -178,6 +178,7 @@ static void wt_status_print_unmerged_header(struct wt_status *s)\n \t} else {\n \t\tstatus_printf_ln(s, c, _(\"  (use \\\"git add/rm <file>...\\\" as appropriate to mark resolution)\"));\n \t}\n+\tstatus_printf_ln(s, c, _(\"  Set advice.statusHints to false to turn off this message\"));\n \tstatus_printf_ln(s, c, \"\");\n }\n \n@@ -194,6 +195,7 @@ static void wt_status_print_cached_header(struct wt_status *s)\n \t\tstatus_printf_ln(s, c, _(\"  (use \\\"git reset %s <file>...\\\" to unstage)\"), s->reference);\n \telse\n \t\tstatus_printf_ln(s, c, _(\"  (use \\\"git rm --cached <file>...\\\" to unstage)\"));\n+\tstatus_printf_ln(s, c, _(\"  Set advice.statusHints to false to turn off this message\"));\n \tstatus_printf_ln(s, c, \"\");\n }\n \n@@ -213,6 +215,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,\n \tstatus_printf_ln(s, c, _(\"  (use \\\"git checkout -- <file>...\\\" to discard changes in working directory)\"));\n \tif (has_dirty_submodules)\n \t\tstatus_printf_ln(s, c, _(\"  (commit or discard the untracked or modified content in submodules)\"));\n+\tstatus_printf_ln(s, c, _(\"  Set advice.statusHints to false to turn off this message\"));\n \tstatus_printf_ln(s, c, \"\");\n }\n \n@@ -225,6 +228,7 @@ static void wt_status_print_other_header(struct wt_status *s,\n \tif (!advice_status_hints)\n \t\treturn;\n \tstatus_printf_ln(s, c, _(\"  (use \\\"git %s <file>...\\\" to include in what will be committed)\"), how);\n+\tstatus_printf_ln(s, c, _(\"  Set advice.statusHints to false to turn off this message\"));\n \tstatus_printf_ln(s, c, \"\");\n }\n \n@@ -783,15 +787,23 @@ static void show_merge_in_progress(struct wt_status *s,\n {\n \tif (has_unmerged(s)) {\n \t\tstatus_printf_ln(s, color, _(\"You have unmerged paths.\"));\n-\t\tif (advice_status_hints)\n+\t\tif (advice_status_hints) {\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (fix conflicts and run \\\"git commit\\\")\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t\t _(\"  Set advice.statusHints to\"\n+\t\t\t\t\t   \" false to turn off this message\"));\n+\t\t}\n \t} else {\n \t\tstatus_printf_ln(s, color,\n \t\t\t_(\"All conflicts fixed but you are still merging.\"));\n-\t\tif (advice_status_hints)\n+\t\tif (advice_status_hints) {\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (use \\\"git commit\\\" to conclude merge)\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t\t _(\"  Set advice.statusHints to \"\n+\t\t\t\t\t   \"false to turn off this message\"));\n+\t\t}\n \t}\n \twt_status_print_trailer(s);\n }\n@@ -813,6 +825,8 @@ static void show_am_in_progress(struct wt_status *s,\n \t\t\t_(\"  (use \\\"git am --skip\\\" to skip this patch)\"));\n \t\tstatus_printf_ln(s, color,\n \t\t\t_(\"  (use \\\"git am --abort\\\" to restore the original branch)\"));\n+\t\tstatus_printf_ln(s, color,\n+\t\t\t _(\"  Set advice.statusHints to false to turn off this message\"));\n \t}\n \twt_status_print_trailer(s);\n }\n@@ -878,17 +892,25 @@ static void show_rebase_in_progress(struct wt_status *s,\n \t\t\t\t_(\"  (use \\\"git rebase --skip\\\" to skip this patch)\"));\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (use \\\"git rebase --abort\\\" to check out the original branch)\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t_(\"  Set advice.statusHints to false to turn off this message\"));\n \t\t}\n \t} else if (state->rebase_in_progress || !stat(git_path(\"MERGE_MSG\"), &st)) {\n \t\tstatus_printf_ln(s, color, _(\"You are currently rebasing.\"));\n-\t\tif (advice_status_hints)\n+\t\tif (advice_status_hints) {\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (all conflicts fixed: run \\\"git rebase --continue\\\")\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t_(\"  Set advice.statusHints to false to turn off this message\"));\n+\t\t}\n \t} else if (split_commit_in_progress(s)) {\n \t\tstatus_printf_ln(s, color, _(\"You are currently splitting a commit during a rebase.\"));\n-\t\tif (advice_status_hints)\n+\t\tif (advice_status_hints) {\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (Once your working directory is clean, run \\\"git rebase --continue\\\")\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t_(\"  Set advice.statusHints to false to turn off this message\"));\n+\t\t}\n \t} else {\n \t\tstatus_printf_ln(s, color, _(\"You are currently editing a commit during a rebase.\"));\n \t\tif (advice_status_hints && !s->amend) {\n@@ -896,6 +918,8 @@ static void show_rebase_in_progress(struct wt_status *s,\n \t\t\t\t_(\"  (use \\\"git commit --amend\\\" to amend the current commit)\"));\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (use \\\"git rebase --continue\\\" once you are satisfied with your changes)\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t_(\"  Set advice.statusHints to false to turn off this message\"));\n \t\t}\n \t}\n \twt_status_print_trailer(s);\n@@ -913,6 +937,8 @@ static void show_cherry_pick_in_progress(struct wt_status *s,\n \t\telse\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (all conflicts fixed: run \\\"git commit\\\")\"));\n+\t\tstatus_printf_ln(s, color,\n+\t\t\t_(\"  Set advice.statusHints to false to turn off this message\"));\n \t}\n \twt_status_print_trailer(s);\n }\n@@ -922,9 +948,12 @@ static void show_bisect_in_progress(struct wt_status *s,\n \t\t\t\tconst char *color)\n {\n \tstatus_printf_ln(s, color, _(\"You are currently bisecting.\"));\n-\tif (advice_status_hints)\n+\tif (advice_status_hints) {\n \t\tstatus_printf_ln(s, color,\n \t\t\t_(\"  (use \\\"git bisect reset\\\" to get back to the original branch)\"));\n+\t\tstatus_printf_ln(s, color,\n+\t\t\t_(\"  Set advice.statusHints to false to turn off this message\"));\n+\t}\n \twt_status_print_trailer(s);\n }\n \n@@ -1011,10 +1040,16 @@ void wt_status_print(struct wt_status *s)\n \t\twt_status_print_other(s, &s->untracked, _(\"Untracked files\"), \"add\");\n \t\tif (s->show_ignored_files)\n \t\t\twt_status_print_other(s, &s->ignored, _(\"Ignored files\"), \"add -f\");\n-\t} else if (s->commitable)\n-\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, _(\"Untracked files not listed%s\"),\n-\t\t\tadvice_status_hints\n-\t\t\t? _(\" (use -u option to show untracked files)\") : \"\");\n+\t} else if (s->commitable) {\n+\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, _(\"Untracked files not listed\"));\n+\t\tif (advice_status_hints) {\n+\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n+\t\t\t\t\t _(\" (use -u option to show untracked files)\"));\n+\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n+\t\t\t\t\t _(\"  Set advice.statusHints to\"\n+\t\t\t\t\t   \" false to turn off this message\"));\n+\t\t}\n+\t}\n \n \tif (s->verbose)\n \t\twt_status_print_verbose(s);\n@@ -1026,24 +1061,32 @@ void wt_status_print(struct wt_status *s)\n \t\telse if (s->workdir_dirty) {\n \t\t\tif (advice_status_hints)\n \t\t\t\tprintf(_(\"no changes added to commit \"\n-\t\t\t\t\t \"(use \\\"git add\\\" and/or \\\"git commit -a\\\")\\n\"));\n+\t\t\t\t\t \"(use \\\"git add\\\" and/or \\\"git commit -a\\\")\\n\"\n+\t\t\t\t\t \"Set advice.statusHints to false\"\n+\t\t\t\t\t \" to turn off this message\\n\"));\n \t\t\telse\n \t\t\t\tprintf(_(\"no changes added to commit\\n\"));\n \t\t} else if (s->untracked.nr) {\n \t\t\tif (advice_status_hints)\n \t\t\t\tprintf(_(\"nothing added to commit but untracked files \"\n-\t\t\t\t\t \"present (use \\\"git add\\\" to track)\\n\"));\n+\t\t\t\t\t \"present (use \\\"git add\\\" to track)\\n\"\n+\t\t\t\t\t \"Set advice.statusHints to false\"\n+\t\t\t\t\t \" to turn off this message\\n\"));\n \t\t\telse\n \t\t\t\tprintf(_(\"nothing added to commit but untracked files present\\n\"));\n \t\t} else if (s->is_initial) {\n \t\t\tif (advice_status_hints)\n \t\t\t\tprintf(_(\"nothing to commit (create/copy files \"\n-\t\t\t\t\t \"and use \\\"git add\\\" to track)\\n\"));\n+\t\t\t\t\t \"and use \\\"git add\\\" to track)\\n\"\n+\t\t\t\t\t \"Set advice.statusHints to false\"\n+\t\t\t\t\t \" to turn off this message\\n\"));\n \t\t\telse\n \t\t\t\tprintf(_(\"nothing to commit\\n\"));\n \t\t} else if (!s->show_untracked_files) {\n \t\t\tif (advice_status_hints)\n-\t\t\t\tprintf(_(\"nothing to commit (use -u to show untracked files)\\n\"));\n+\t\t\t\tprintf(_(\"nothing to commit (use -u to show untracked files)\\n\"\n+\t\t\t\t\t \"Set advice.statusHints to false\"\n+\t\t\t\t\t \" to turn off this message\\n\"));\n \t\t\telse\n \t\t\t\tprintf(_(\"nothing to commit\\n\"));\n \t\t} else\n-- 8< --\n-- \nDuy\n"},{"id":"200987","messageId":"vpqhaq13xdq.fsf@grenoble-inp.fr","threadId":"31706","inReplyTo":"20121011124326.GA30589@do","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-10-11T14:18:41Z","receivedAt":"2012-10-11T14:18:41Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> On Fri, Oct 05, 2012 at 01:03:28PM -0700, Junio C Hamano wrote:\n>\n>> OK, the messages are supposed to advise how to turn them off, so we\n>> would want some code updates in that case.\n>\n> Something like this? It turns out none of the advice messages says\n> anything about advice.*.\n\nPersonally, I'm fine with the current situation. Advanced users can read\nthe documentation, and for others, the messages are usually more helpful\nthan annoying.\n\n> This patch makes many output more verbose/annoying,\n\nFor example, it makes the output of git status look like:\n\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#   Set advice.statusHints to false to turn off this message\n#\n#       modified:   foo.txt\n#\n# Changes not staged for commit:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#   Set advice.statusHints to false to turn off this message\n#\n#       modified:   foo.txt\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#   Set advice.statusHints to false to turn off this message\n#\n#       bar.txt\n\nI think it's going really too far in verbosity, the actual information\nis hidden by the advices.\n\n> (which is good, more motivation to turn advice off).\n\nI disagree. Having advices turned on doesn't harm anyone. I don't\nremember anyone complaining about the verbosity of Git's advices. I've\nseen *many* more people complaining about the user-unfriendliness of\nGit.\n\nI'm fine with very verbose (and scary) messages when the user did\nsomething wrong (for example, the advice.implicitIdentity is something\nyou should never see if you configured Git properly before commiting).\nBut the user should not feel blamed for using the default configuration\nof advice messages. The tripple repetition in \"git status\" shown above\nreally sounds like \"hey, dumb user, why did you not set\nadvice.statusHints already\", and is doubly scary for newbies, because\nthey are not told how to set the variable, nor what a config variable is\nto Git.\n\nI understand the motivation of making the advice.* section of \"man\ngit-config\" more easily discoverable, but then picking a reasonable\nsubset of the advice messages (e.g. places that are already verbose\nanyway, and not places that total beginners would see on a daily basis\nlike \"git status\") would be much better than targetting exhaustivity\nIMHO.\n\n> @@ -89,7 +90,9 @@ void detach_advice(const char *new_name)\n>  \t\"state without impacting any branches by performing another checkout.\\n\\n\"\n>  \t\"If you want to create a new branch to retain commits you create, you may\\n\"\n>  \t\"do so (now or later) by using -b with the checkout command again. Example:\\n\\n\"\n> -\t\"  git checkout -b new_branch_name\\n\\n\";\n> +\t\"  git checkout -b new_branch_name\\n\"\n> +\t\"Set either advice.detachedHead to false to turn off this message\\n\\n\"\n             ^^^^^^\n\nWrong cut-and paste from \"... either XXX or YYY ...\"? (repeated several\ntimes below).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"200988","messageId":"CACsJy8C2zYkWV4b60WczGe4CCsXXffa00hnzj723+=ubhmA67Q@mail.gmail.com","threadId":"31706","inReplyTo":"vpqhaq13xdq.fsf@grenoble-inp.fr","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-10-11T14:43:45Z","receivedAt":"2012-10-11T14:43:45Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Oct 11, 2012 at 9:18 PM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> For example, it makes the output of git status look like:\n>\n> # On branch master\n> # Changes to be committed:\n> #   (use \"git reset HEAD <file>...\" to unstage)\n> #   Set advice.statusHints to false to turn off this message\n> #\n> #       modified:   foo.txt\n> #\n> # Changes not staged for commit:\n> #   (use \"git add <file>...\" to update what will be committed)\n> #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> #   Set advice.statusHints to false to turn off this message\n> #\n> #       modified:   foo.txt\n> #\n> # Untracked files:\n> #   (use \"git add <file>...\" to include in what will be committed)\n> #   Set advice.statusHints to false to turn off this message\n> #\n> #       bar.txt\n\nAnd two more lines on my output:\n\n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n Set advice.statusHints to false to turn off this message\n\n> I think it's going really too far in verbosity, the actual information\n> is hidden by the advices.\n\nWe could make it only one extra line in this case by prepending \"hint:\n\" before the advice and say \"you could turn the hints off by setting\nadvice.statusHints\" at the end. Not applicable in general though.\n\n>> (which is good, more motivation to turn advice off).\n>\n> I disagree. Having advices turned on doesn't harm anyone. I don't\n> remember anyone complaining about the verbosity of Git's advices. I've\n> seen *many* more people complaining about the user-unfriendliness of\n> Git.\n\n\"git status\" is actually quite verbose, but the advice only plays a\npart of it. So, not an actual complaint from me about the advice\nalone.\n\n>> -     \"  git checkout -b new_branch_name\\n\\n\";\n>> +     \"  git checkout -b new_branch_name\\n\"\n>> +     \"Set either advice.detachedHead to false to turn off this message\\n\\n\"\n>             ^^^^^^\n>\n> Wrong cut-and paste from \"... either XXX or YYY ...\"? (repeated several\n> times below).\n\nCut&Paste mistake.\n-- \nDuy\n"},{"id":"200993","messageId":"7vehl57zkh.fsf@alter.siamese.dyndns.org","threadId":"31706","inReplyTo":"vpqhaq13xdq.fsf@grenoble-inp.fr","subject":"Re: push.default documented in \"man git-push\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-11T16:17:50Z","receivedAt":"2012-10-11T16:17:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n>\n>> On Fri, Oct 05, 2012 at 01:03:28PM -0700, Junio C Hamano wrote:\n>>\n>>> OK, the messages are supposed to advise how to turn them off, so we\n>>> would want some code updates in that case.\n>>\n>> Something like this? It turns out none of the advice messages says\n>> anything about advice.*.\n>\n> Personally, I'm fine with the current situation. Advanced users can read\n> the documentation, and for others, the messages are usually more helpful\n> than annoying.\n\nOK, you convinced me.\n\n> I disagree. Having advices turned on doesn't harm anyone. I don't\n> remember anyone complaining about the verbosity of Git's advices. I've\n> seen *many* more people complaining about the user-unfriendliness of\n> Git.\n>\n> I'm fine with very verbose (and scary) messages when the user did\n> something wrong (for example, the advice.implicitIdentity is something\n> you should never see if you configured Git properly before commiting).\n> But the user should not feel blamed for using the default configuration\n> of advice messages. The tripple repetition in \"git status\" shown above\n> really sounds like \"hey, dumb user, why did you not set\n> advice.statusHints already\", and is doubly scary for newbies, because\n> they are not told how to set the variable, nor what a config variable is\n> to Git.\n\nLet's let the list of advice.* messages in Documentation/config.txt\ndo their job.\n\nNguyen, thanks for taking a look.  I do agree the extra \"here is how\nto rob helpful hints from yourself before you learn them\" seems to\ndo more harm than good.\n"}]}