Subject: Re: [PATCH 6/6] remote.c: introduce branch.<name>.pushremote

From: Junio C Hamano <[email-masked]>
Date: Fri, 22 Mar 2013 10:37:46 -0700

Ramkumar Ramachandra <[email-masked]> writes:

> This new configuration variable overrides `remote.pushdefault` and
> `branch.<name>.remote` for pushes.  In a typical triangular-workflow
> setup, you would want to set `remote.pushdefault` to specify the
> remote to push to for all branches, and use this option to override it
> for a specific branch.
>
> Signed-off-by: Ramkumar Ramachandra <[email-masked]>
> ---
>  Documentation/config.txt | 18 ++++++++++++++----
>  remote.c                 |  4 ++++
>  t/t5516-fetch-push.sh    | 15 +++++++++++++++
>  3 files changed, 33 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 09a8294..6595cd6 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -726,9 +726,18 @@ branch.<name>.remote::
>  	When on branch <name>, it tells 'git fetch' and 'git push'
>  	which remote to fetch from/push to.  The remote to push to
>  	may be overridden with `remote.pushdefault` (for all branches).
> -	If no remote is configured, or if you are not on any branch,
> -	it defaults to `origin` for fetching and `remote.pushdefault`
> -	for pushing.
> +	The remote to push to, for the current branch, may be further
> +	overridden by `branch.<name>.pushremote`.  If no remote is
> +	configured, or if you are not on any branch, it defaults to
> +	`origin` for fetching and `remote.pushdefault` for pushing.

Nice write-up. It may be easier to read if the new text is in a
separate paragraph, though.

> +branch.<name>.pushremote::
> +	When on branch <name>, it overrides `branch.<name>.remote`
> +	when pushing.  It also overrides `remote.pushdefault` when
> +	pushing from branch <name>.

Perhaps s/when pushing/for pushing/; Or "Specify what remote to push
to when on branch <name>, overriding `branch.<name>.remote` and
`remote.pushdefault`."

> +	In a typical triangular-workflow
> +	setup,...

Is there an "atypical triangular-workflow"?  Drop "typical" and
explain what you mean by triangular, perhaps like

	When you pull from one place (e.g. your upstream) and push
	to another place (e.g. your own publishing repository),

Then the rest of the text flows more naturally without ever
introducing a new lingo "triangular" that is not in glossary.

> +	... you would want to set `remote.pushdefault` to specify
> +	the remote to push to for all branches, and use this option to
> +	override it for a specific branch.