All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <tr@thomasrast.ch>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH v2 6/7] Documentation: put blame/log -L in sticked form
Date: Tue, 29 Oct 2013 18:11:29 -0700	[thread overview]
Message-ID: <xmqqvc0fd0la.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <c41aef218951f8b0ec6a20e1dbc39712ad13afce.1383031141.git.tr@thomasrast.ch> (Thomas Rast's message of "Tue, 29 Oct 2013 08:20:39 +0100")

Thomas Rast <tr@thomasrast.ch> writes:

> The next patch will document gitk -L, but gitk does not understand the
> separated form ('gitk -L :foo:bar' results in an error).  Spell
> git-blame and git-log -L, which are supposed to be "the same" option,
> without the spaces to prevent confusion.

I agree that this patch may reduce confusion locally, but if we were
to go in this direction, we should be consistent and enforce "stuck"
form everywhere, not just the options you happened to have passed
thru to gitk, but other options such as "-S <revs-file>", and also
other commands that do not have anything to do with gitk (e.g. "git
commit -C<commit>", not "git commit -C <commit>".  Otherwise you
will give a wrong impression to readers as if they have to remember
which ones need to use the stuck form and which ones do not.

> Signed-off-by: Thomas Rast <tr@thomasrast.ch>
> ---
>  Documentation/blame-options.txt | 8 ++++----
>  Documentation/git-blame.txt     | 8 ++++----
>  Documentation/git-log.txt       | 6 +++---
>  3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
> index 0cebc4f..28ca95e 100644
> --- a/Documentation/blame-options.txt
> +++ b/Documentation/blame-options.txt
> @@ -9,13 +9,13 @@
>  --show-stats::
>  	Include additional statistics at the end of blame output.
>  
> --L <start>,<end>::
> --L :<regex>::
> +-L<start>,<end>::
> +-L:<regex>::
>  	Annotate only the given line range. May be specified multiple times.
>  	Overlapping ranges are allowed.
>  +
> -<start> and <end> are optional. ``-L <start>'' or ``-L <start>,'' spans from
> -<start> to end of file. ``-L ,<end>'' spans from start of file to <end>.
> +<start> and <end> are optional. ``-L<start>'' or ``-L<start>,'' spans from
> +<start> to end of file. ``-L,<end>'' spans from start of file to <end>.
>  +
>  include::line-range-format.txt[]
>  
> diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
> index f2c85cc..085dba1 100644
> --- a/Documentation/git-blame.txt
> +++ b/Documentation/git-blame.txt
> @@ -9,7 +9,7 @@ SYNOPSIS
>  --------
>  [verse]
>  'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
> -	    [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
> +	    [-L<range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
>  	    [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>] [--] <file>
>  
>  DESCRIPTION
> @@ -139,12 +139,12 @@ lines 40-60 for file `foo`, you can use the `-L` option like so
>  (they mean the same thing -- both ask for 21 lines starting at
>  line 40):
>  
> -	git blame -L 40,60 foo
> -	git blame -L 40,+21 foo
> +	git blame -L40,60 foo
> +	git blame -L40,+21 foo
>  
>  Also you can use a regular expression to specify the line range:
>  
> -	git blame -L '/^sub hello {/,/^}$/' foo
> +	git blame -L'/^sub hello {/,/^}$/' foo
>  
>  which limits the annotation to the body of the `hello` subroutine.
>  
> diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
> index 34097ef..87c10fa 100644
> --- a/Documentation/git-log.txt
> +++ b/Documentation/git-log.txt
> @@ -62,8 +62,8 @@ produced by --stat etc.
>  	Note that only message is considered, if also a diff is shown
>  	its size is not included.
>  
> --L <start>,<end>:<file>::
> --L :<regex>:<file>::
> +-L<start>,<end>:<file>::
> +-L:<regex>:<file>::
>  
>  	Trace the evolution of the line range given by "<start>,<end>"
>  	(or the funcname regex <regex>) within the <file>.  You may
> @@ -152,7 +152,7 @@ EXAMPLES
>  	This makes sense only when following a strict policy of merging all
>  	topic branches when staying on a single integration branch.
>  
> -`git log -L '/int main/',/^}/:main.c`::
> +`git log -L'/int main/',/^}/:main.c`::
>  
>  	Shows how the function `main()` in the file 'main.c' evolved
>  	over time.

  reply	other threads:[~2013-10-30  1:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 19:44 [PATCH gitk 0/4] gitk support for git log -L Thomas Rast
2013-06-09 19:44 ` [PATCH gitk 1/4] gitk: refactor per-line part of getblobdiffline and its support Thomas Rast
2013-06-09 19:44 ` [PATCH gitk 2/4] gitk: split out diff part in $commitinfo Thomas Rast
2013-06-09 19:44 ` [PATCH gitk 3/4] gitk: support showing the gathered inline diffs Thomas Rast
2013-06-09 19:44 ` [PATCH gitk 4/4] gitk: recognize -L option Thomas Rast
2013-07-23 15:19 ` [PATCH gitk 0/4] gitk support for git log -L Thomas Rast
2013-07-29 19:37   ` Thomas Rast
2013-07-29 20:07     ` Jens Lehmann
2013-07-31 13:17       ` Thomas Rast
2013-08-18 11:54         ` Paul Mackerras
2013-08-19  8:21           ` Thomas Rast
2013-08-19 17:30             ` Junio C Hamano
2013-10-13  6:31               ` Thomas Rast
2013-10-14  5:25                 ` Jonathan Nieder
2013-10-20 16:57                   ` [PATCH] Documentation: revamp gitk(1) Thomas Rast
2013-10-29  7:20                     ` [PATCH v2 0/7] gitk -L Thomas Rast
2013-10-29  7:20                       ` [PATCH v2 1/7] gitk: support -G option from the command line Thomas Rast
2013-10-30  0:52                         ` Junio C Hamano
2013-10-30  6:30                           ` Thomas Rast
2013-10-30 16:42                             ` Junio C Hamano
2013-10-29  7:20                       ` [PATCH v2 2/7] gitk: refactor per-line part of getblobdiffline and its support Thomas Rast
2013-10-29  7:20                       ` [PATCH v2 3/7] gitk: split out diff part in $commitinfo Thomas Rast
2013-10-29  7:20                       ` [PATCH v2 4/7] gitk: support showing the gathered inline diffs Thomas Rast
2013-10-29  7:20                       ` [PATCH v2 5/7] gitk: recognize -L option Thomas Rast
2013-10-29  7:20                       ` [PATCH v2 6/7] Documentation: put blame/log -L in sticked form Thomas Rast
2013-10-30  1:11                         ` Junio C Hamano [this message]
2013-10-30  6:29                           ` Thomas Rast
2013-10-30 17:09                             ` Junio C Hamano
2013-10-30 18:59                               ` Thomas Rast
2013-10-30 19:37                                 ` Junio C Hamano
2013-11-16 17:37                                 ` [PATCH v3 gitk 0/5] gitk -L Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 gitk 1/5] gitk: support -G option from the command line Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 gitk 2/5] gitk: refactor per-line part of getblobdiffline and its support Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 gitk 3/5] gitk: split out diff part in $commitinfo Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 gitk 4/5] gitk: support showing the gathered inline diffs Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 gitk 5/5] gitk: recognize -L option Thomas Rast
2013-12-01 22:25                                   ` [PATCH v3 gitk 0/5] gitk -L Paul Mackerras
2013-11-16 17:37                                 ` [PATCH v3 0/3] Documentation: stuck arguments and gitk log -L Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 1/3] commit-tree: use prefixcmp instead of memcmp(..., N) Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 2/3] Documentation: convert to --option=arg form where possible Thomas Rast
2013-11-16 17:37                                   ` [PATCH v3 3/3] Documentation/gitk: document -L option Thomas Rast
2013-10-29  7:20                       ` [PATCH v2 7/7] " Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvc0fd0la.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=paulus@samba.org \
    --cc=tr@thomasrast.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.