Git development
 help / color / mirror / Atom feed
* [PATCH] doc/config: do a better job of introducing 'worktree.guessRemote'
@ 2018-12-23 19:24 Eric Sunshine
  2019-01-06 18:09 ` Thomas Gummerer
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sunshine @ 2018-12-23 19:24 UTC (permalink / raw)
  To: git
  Cc: Олег Самойлов,
	Thomas Gummerer, Eric Sunshine

The documentation for this option jumps right in with "With `add`",
without explaining that `add` is a sub-command of "git worktree".
Together with rather odd grammatical structure of the remainder of the
sentence, the description can be difficult for newcomers to understand.
Clarify by improving the grammar and mentioning "git worktree add"
explicitly.

Reported-by: Олег Самойлов <splarv@ya.ru>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---

Reference: https://public-inbox.org/git/0E640233-B2CB-465D-9713-BBECE331CA80@ya.ru/

Documentation/config/worktree.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/config/worktree.txt b/Documentation/config/worktree.txt
index b853798fc2..048e349482 100644
--- a/Documentation/config/worktree.txt
+++ b/Documentation/config/worktree.txt
@@ -1,6 +1,6 @@
 worktree.guessRemote::
-	With `add`, if no branch argument, and neither of `-b` nor
-	`-B` nor `--detach` are given, the command defaults to
+	If no branch is specified and neither `-b` nor `-B` nor
+	`--detach` is used, then `git worktree add` defaults to
 	creating a new branch from HEAD.  If `worktree.guessRemote` is
 	set to true, `worktree add` tries to find a remote-tracking
 	branch whose name uniquely matches the new branch name.  If
-- 
2.20.1.415.g653613c723


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc/config: do a better job of introducing 'worktree.guessRemote'
  2018-12-23 19:24 [PATCH] doc/config: do a better job of introducing 'worktree.guessRemote' Eric Sunshine
@ 2019-01-06 18:09 ` Thomas Gummerer
  2019-01-06 18:19   ` Eric Sunshine
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gummerer @ 2019-01-06 18:09 UTC (permalink / raw)
  To: Eric Sunshine
  Cc: git,
	Олег Самойлов

On 12/23, Eric Sunshine wrote:
> The documentation for this option jumps right in with "With `add`",
> without explaining that `add` is a sub-command of "git worktree".
> Together with rather odd grammatical structure of the remainder of the
> sentence, the description can be difficult for newcomers to understand.
> Clarify by improving the grammar and mentioning "git worktree add"
> explicitly.
> 
> Reported-by: Олег Самойлов <splarv@ya.ru>
> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
> ---

Thanks, this reads much better indeed.  I was briefly wondering if a
similar change is needed in the documentation for the 'git worktree'
command itself.  It currently reads:

	With `worktree add <path>`, without `<commit-ish>`, instead
	of creating a new branch from HEAD, if there exists a tracking
	branch in exactly one remote matching the basename of `<path>`,
	base the new branch on the remote-tracking branch, and mark
	the remote-tracking branch as "upstream" from the new branch.

I do think the documentation for the config option is slightly easier
to read, especially with your improvements below.  Dunno if it's worth
adjusting the test in the 'git worktree' documentation as well?

> Reference: https://public-inbox.org/git/0E640233-B2CB-465D-9713-BBECE331CA80@ya.ru/
> 
> Documentation/config/worktree.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/config/worktree.txt b/Documentation/config/worktree.txt
> index b853798fc2..048e349482 100644
> --- a/Documentation/config/worktree.txt
> +++ b/Documentation/config/worktree.txt
> @@ -1,6 +1,6 @@
>  worktree.guessRemote::
> -	With `add`, if no branch argument, and neither of `-b` nor
> -	`-B` nor `--detach` are given, the command defaults to
> +	If no branch is specified and neither `-b` nor `-B` nor
> +	`--detach` is used, then `git worktree add` defaults to
>  	creating a new branch from HEAD.  If `worktree.guessRemote` is
>  	set to true, `worktree add` tries to find a remote-tracking
>  	branch whose name uniquely matches the new branch name.  If
> -- 
> 2.20.1.415.g653613c723
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc/config: do a better job of introducing 'worktree.guessRemote'
  2019-01-06 18:09 ` Thomas Gummerer
@ 2019-01-06 18:19   ` Eric Sunshine
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sunshine @ 2019-01-06 18:19 UTC (permalink / raw)
  To: Thomas Gummerer
  Cc: Git List,
	Олег Самойлов

On Sun, Jan 6, 2019 at 1:09 PM Thomas Gummerer <t.gummerer@gmail.com> wrote:
> On 12/23, Eric Sunshine wrote:
> > The documentation for this option jumps right in with "With `add`",
> > without explaining that `add` is a sub-command of "git worktree".
> > Together with rather odd grammatical structure of the remainder of the
> > sentence, the description can be difficult for newcomers to understand.
> > Clarify by improving the grammar and mentioning "git worktree add"
> > explicitly.
>
> Thanks, this reads much better indeed.  I was briefly wondering if a
> similar change is needed in the documentation for the 'git worktree'
> command itself.  It currently reads:
>
>         With `worktree add <path>`, without `<commit-ish>`, instead
>         of creating a new branch from HEAD, if there exists a tracking
>         branch in exactly one remote matching the basename of `<path>`,
>         base the new branch on the remote-tracking branch, and mark
>         the remote-tracking branch as "upstream" from the new branch.
>
> I do think the documentation for the config option is slightly easier
> to read, especially with your improvements below.  Dunno if it's worth
> adjusting the test in the 'git worktree' documentation as well?

Such a change to git-worktree.txt could be done, though I think it's
outside the scope of this patch since "With ...," is not nearly so
confusing in the context of git-worktree.txt given that the reader
_knows_ that he/she is reading (exclusively) about "git worktree".
Also, almost all of the options in git-worktree.txt are phrased "With
...,", so such a change would be more all-encompassing.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-06 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-23 19:24 [PATCH] doc/config: do a better job of introducing 'worktree.guessRemote' Eric Sunshine
2019-01-06 18:09 ` Thomas Gummerer
2019-01-06 18:19   ` Eric Sunshine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox