git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>, Phil Hord <phil.hord@gmail.com>
Subject: Re: [PATCH 2/2] diffcore-pickaxe doc: document -S and -G properly
Date: Fri, 24 May 2013 15:07:20 +0530	[thread overview]
Message-ID: <CALkWK0n+NTnO0_4jNuR3Z5qmA_=-Dux+gq8kNzAT4YLC12Z8uQ@mail.gmail.com> (raw)
In-Reply-To: <7vsj1jzao7.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> [...]

I agree with the other comments, and have made suitable changes.
Let's review your block now.

>         This transformation is used to find filepairs that represent
>         two kinds of changes, and is controlled by the -S, -G and
>         --pickaxe-all options.

Why do you call this a "transformation"?  Is git log --author="foo" a
transformation on the git-log output?  Then how is git log -Sfoo a
transformation?

Two kinds of changes controlled by three different options?  Isn't the
original much clearer?

The title says diffcore-pickaxe, and the first paragraph says:

There are two kinds of pickaxe: the S kind (corresponding to 'git log
-S') and the G kind (mnemonic: grep; corresponding to 'git log -G').

>         The "-S<block of text>" option tells Git to consider that a
>         filepair has differences only if the number of occurrences
>         of the specified block of text is different between its
>         preimage and its postimage, and treat other filepairs as if
>         they did not have any change.

I'll rewrite this without the trailing "and treat other filepairs as
if they did not have any change" (which I'm not fond of).

>         This is meant to be used with
>         a block of text that is unique enough to occur only once (so
>         expected the number of occurences is 1 vs 0 or 0 vs 1) to
>         use with "git log" to find a commit that touched the block
>         of text the last time.

You're saying how you think it's "meant" to be used, but in doing so
you've failed to describe its operation faithfully.  I've already
described how it's meant to be used in diff-options (digging a block
of text iteratively) and this is the place to explain what it is doing
faithfully.  Hence my previous writeup on changes in number of
occurrences and rename detection: I _had_ to read the code to
understand it properly, and your writeup is not helping by telling me
about idiomatic usage.

Also, you've dropped computational expense which was there in the original.

>         When used with the "--pickaxe-regex"
>         option, the <block of text> is used as a POSIX extended
>         regular expression to match, instead of a literal string.

Better.

>         The "-G<regular expression>" option tells Git to consider
>         that a filepair has differences only if a textual diff
>         between its preimage and postimage would indicate a line
>         that matches the given regular expression is changed, and
>         treat other filepairs as if they did not have any change.

"would indicate"?  Really?  I'll rewrite this without the trailing
"and treat other filepairs ..".

You've once again dropped what it means in the context of in-file
moves (rename detection), and computational expense from the original.

>         When -S or -G option is used without "--pickaxe-all" option,
>         only filepairs that match their respective criterion are
>         kept in the output.

Much better.

>         When `--pickaxe-all` is used, all
>         filepairs intact if there is such a filepair, or makes the
>         output empty otherwise.

-ENOPARSE.  I didn't particularly like the original, and this isn't
better.  I'll rewrite it.

>         This behaviour is designed to make
>         reviewing of the changes in the context of the whole
>         changeset easier.

Same as original.  Okay.

Thanks.

  reply	other threads:[~2013-05-24  9:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17 12:23 [PATCH v2 0/2] Improve diffcore-pickaxe documentation Ramkumar Ramachandra
2013-05-17 12:23 ` [PATCH 1/2] diffcore-pickaxe: make error messages more consistent Ramkumar Ramachandra
2013-05-18  1:25   ` Junio C Hamano
2013-05-17 12:23 ` [PATCH 2/2] diffcore-pickaxe doc: document -S and -G properly Ramkumar Ramachandra
2013-05-18  1:24   ` Junio C Hamano
2013-05-19  7:33     ` Junio C Hamano
2013-05-24  9:37       ` Ramkumar Ramachandra [this message]
2013-05-24 14:58         ` Phil Hord
2013-05-24 16:01           ` Ramkumar Ramachandra
2013-05-24 16:54           ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2013-05-24 10:33 [PATCH v3 0/2] Improve diffcore-pickaxe documentation Ramkumar Ramachandra
2013-05-24 10:33 ` [PATCH 2/2] diffcore-pickaxe doc: document -S and -G properly Ramkumar Ramachandra
2013-05-24 17:31   ` Junio C Hamano
2013-05-31 12:04     ` Ramkumar Ramachandra
2013-06-02 19:56       ` Junio C Hamano
2013-06-02 20:28         ` Ramkumar Ramachandra
2013-05-31 12:12 [PATCH v4 0/2] Improve diffcore-pickaxe documentation Ramkumar Ramachandra
2013-05-31 12:12 ` [PATCH 2/2] diffcore-pickaxe doc: document -S and -G properly Ramkumar Ramachandra
2013-06-03 17:54   ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CALkWK0n+NTnO0_4jNuR3Z5qmA_=-Dux+gq8kNzAT4YLC12Z8uQ@mail.gmail.com' \
    --to=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phil.hord@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).