threads / patch / 47169

v3bisect: mention "view" as an alternative to "visualize"

Subject: [PATCH v3] bisect: mention "view" as an alternative to "visualize"

## tl;dr

3 messages between Nov 11, 2017 and Nov 12, 2017. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Robert P. J. Day· Nov 11, 2017, 13:39 UTC · lore

Tweak a number of files to mention "view" as an alternative to "visualize".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
  ... converging slowly ...
Show changes to 4 files +10 −11

Documentation/git-bisect.txt, builtin/bisect--helper.c, contrib/completion/git-completion.bash, git-bisect.sh

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 6c42abf07..dde720552 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -23,7 +23,7 @@ on the subcommand:
  git bisect terms [--term-good | --term-bad]
  git bisect skip [(<rev>|<range>)...]
  git bisect reset [<commit>]
- git bisect visualize
+ git bisect (visualize|view)
  git bisect replay <logfile>
  git bisect log
  git bisect run <cmd>...
@@ -193,24 +193,23 @@ git bisect start --term-new fixed --term-old broken
 Then, use `git bisect <term-old>` and `git bisect <term-new>` instead
 of `git bisect good` and `git bisect bad` to mark commits.

-Bisect visualize
-~~~~~~~~~~~~~~~~
+Bisect visualize/view
+~~~~~~~~~~~~~~~~~~~~~

 To see the currently remaining suspects in 'gitk', issue the following
-command during the bisection process:
+command during the bisection process (the subcommand `view` can, in all
+cases, be used as an alternative to `visualize`):

 ------------
 $ git bisect visualize
 ------------

-`view` may also be used as a synonym for `visualize`.
-
 If the `DISPLAY` environment variable is not set, 'git log' is used
 instead.  You can also give command-line options such as `-p` and
 `--stat`.

 ------------
-$ git bisect view --stat
+$ git bisect visualize --stat
 ------------

 Bisect log and bisect replay
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 35d2105f9..4b5fadcbe 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -46,7 +46,7 @@ static int check_term_format(const char *term, const char *orig_term)
 		return error(_("'%s' is not a valid term"), term);

 	if (one_of(term, "help", "start", "skip", "next", "reset",
-			"visualize", "replay", "log", "run", "terms", NULL))
+			"visualize", "view", "replay", "log", "run", "terms", NULL))
 		return error(_("can't use the builtin command '%s' as a term"), term);

 	/*
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index fdd984d34..52f68c922 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1162,7 +1162,7 @@ _git_bisect ()
 {
 	__git_has_doubledash && return

-	local subcommands="start bad good skip reset visualize replay log run"
+	local subcommands="start bad good skip reset visualize view replay log run"
 	local subcommand="$(__git_find_on_cmdline "$subcommands")"
 	if [ -z "$subcommand" ]; then
 		__git_find_repo_path
diff --git a/git-bisect.sh b/git-bisect.sh
index 0138a8860..a82256e34 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -1,6 +1,6 @@
 #!/bin/sh

-USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]'
+USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|view|replay|log|run]'
 LONG_USAGE='git bisect help
 	print this long help message.
 git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]
@@ -20,7 +20,7 @@ git bisect next
 	find next bisection to test and check it out.
 git bisect reset [<commit>]
 	finish bisection search and go back to commit.
-git bisect visualize
+git bisect (visualize|view)
 	show bisect status in gitk.
 git bisect replay <logfile>
 	replay bisection log.
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Junio C Hamano· Nov 12, 2017, 05:55 UTC · re: Robert P. J. Day · lore

Re: [PATCH v3] bisect: mention "view" as an alternative to "visualize"

"Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>  To see the currently remaining suspects in 'gitk', issue the following
> -command during the bisection process:
> +command during the bisection process (the subcommand `view` can, in all
> +cases, be used as an alternative to `visualize`):
I'd drop ", in all cases," if I were writing this.

If it were very common that some "synonyms" are only usable in certain limited cases, singling this out and explicitly saying that "'view', unlike many other 'synonyms', is truly a synonym to visualize in all cases" would make sense and would help readers, but I do not think that is the case. An alternative by definition should be usable "in all cases", so I do not think the phrase helps the readers at all.

Show 10 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index fdd984d34..52f68c922 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1162,7 +1162,7 @@ _git_bisect ()
>  {
>  	__git_has_doubledash && return
>
> -	local subcommands="start bad good skip reset visualize replay log run"
> +	local subcommands="start bad good skip reset visualize view replay log run"
This change makes the end user experience a lot worse, I am afraid.

People used to be able to say "bisect vi<TAB>" and I'd imagine that many are used to type exactly that. Now they get two choices and have to say 's' (or 'e') before hitting another <TAB>.

Robert P. J. Day· Nov 12, 2017, 09:21 UTC · re: Junio C Hamano · lore

Re: [PATCH v3] bisect: mention "view" as an alternative to "visualize"

On Sun, 12 Nov 2017, Junio C Hamano wrote:
Show 33 quoted lines
> "Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>
> >  To see the currently remaining suspects in 'gitk', issue the following
> > -command during the bisection process:
> > +command during the bisection process (the subcommand `view` can, in all
> > +cases, be used as an alternative to `visualize`):
>
> I'd drop ", in all cases," if I were writing this.
>
> If it were very common that some "synonyms" are only usable in
> certain limited cases, singling this out and explicitly saying that
> "'view', unlike many other 'synonyms', is truly a synonym to
> visualize in all cases" would make sense and would help readers, but
> I do not think that is the case.  An alternative by definition
> should be usable "in all cases", so I do not think the phrase helps
> the readers at all.
>
> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> > index fdd984d34..52f68c922 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1162,7 +1162,7 @@ _git_bisect ()
> >  {
> >  	__git_has_doubledash && return
> >
> > -	local subcommands="start bad good skip reset visualize replay log run"
> > +	local subcommands="start bad good skip reset visualize view replay log run"
>
> This change makes the end user experience a lot worse, I am afraid.
>
> People used to be able to say "bisect vi<TAB>" and I'd imagine that
> many are used to type exactly that.  Now they get two choices and
> have to say 's' (or 'e') before hitting another <TAB>.
  good points, i'll re-roll and re-submit.
rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

← back to recent threads