git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] diffcore-pickaxe doc: document -S and -G properly

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 31, 2013, 12:04 UTC
Message-ID
<CALkWK0m+kUa0QUotHXSYK40vFviFFv2yETnf6sEZMh05gOgLKg@mail.gmail.com>
In-Reply-To
<7v38tcb7yx.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> [...]
I agree with everything else, and made changes accordingly.
>         This transformation limits the set of filepairs to those
>         that change specified strings between the preimage and the
>         postimage in a certain way.
Definitely good.
>         -S<block of text> and -G<regex> options are used to specify
>         different ways these strings are sought.
Definitely better than the "two kinds of pickaxe" thing.
Show 5 quoted lines
>         Without
>         --pickaxe-all, only the filepairs matching the given
>         criterion is left in the output; all filepairs are left in
>         the output when --pickaxe-all is used and if at least one
>         filepair matches the given criterion.

Why do a poor-man's version of --pickaxe-all here, when the last paragraph already does justice to this?

When `-S` or `-G` are used without `--pickaxe-all`, only filepairs that match their respective criterion are kept in the output. When `--pickaxe-all` is used, if even one filepair matches their respective criterion in a changeset, the entire changeset is kept. This behavior is designed to make reviewing changes in the context of the whole changeset easier.

Show 9 quoted lines
> I am not sure why it is necessary to say anything about what the
> previous step (diffcore-rename) might have done.  The input of this
> (or any other) step in the diffcore pipeline is a preimage-postimage
> filepairs, and to this transformation the filename does not matter.
> Whether a file was moved (either "wholesale", implying nothing
> changed, or renamed with modification at the same time) without
> touching the block of text, or a file did not get involved in any
> renaming, the only thing that matters is what the preimage and the
> postimage in a filepair has (or does not have).

While what you're saying is technically true, I think it is important to explain the interaction between diffcore-pickaxe and diffcore-rename as I have done. Someone who wants to understand what `git log -S` does will come to this page and read this section: without reading diffcore-rename, she will have an incomplete picture; what's the harm in explaining diffcore-rename in the context of diffcore-pickaxe?

I did do a s/rename detection/diffcore-rename/ though, so the user knows where to look for more on this rename thing.

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Improve diffcore-pickaxe documentation”
  1. 0/2 Improve diffcore-pickaxe documentationRamkumar Ramachandra, May 24, 2013
  2. 1/2 diffcore-pickaxe: make error messages more consistentRamkumar Ramachandra, May 24, 2013
  3. 2/2 diffcore-pickaxe doc: document -S and -G properlyRamkumar Ramachandra, May 24, 2013
  4. Junio C HamanoMay 24, 2013
  5. Ramkumar RamachandraMay 31, 2013
  6. Junio C HamanoJun 2, 2013
  7. Ramkumar RamachandraJun 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.