Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:29

Ramkumar Ramachandra [off-list ref] writes:
quoted hunk
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 <redacted>
---
 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help