Improve diffcore-pickaxe documentation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 2 repliesIn review
- v32 patches 4 repliesSuperseded
- v22 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 2 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | diffcore-pickaxe: make error messages more consistentdiffcore-pickaxe.c | +2 | 1 reply | |
| 2/2 | diffcore-pickaxe doc: document -S and -G properlyDocumentation/ Documentation/ | +57 | 1 reply |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Junio C Hamano |
|---|---|
| 1/2 | |
| 2/2 | Co-authored-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/2] Improve diffcore-pickaxe documentation
Junio had some suggestions in the previous round. The inter-diff follows.
Yeah, word-diff is a bit messy. Which brings me to: is it possible to turn on word-diff only where heuristically appropriate? word-diff applied on the rewrite of the first paragraph of gitdiffcore.txt is a disaster, but okay everywhere else.
Documentation/diff-options.txt +0 -0
@@ -387,11 +387,11 @@ ifndef::git-format-patch[]
the specified string (i.e. addition/deletion) in a file. Intended for the scripter's use.
+
It is[-especially-] useful when you're looking for an exact block of code (like a struct), and want to know the history of that block since it first came into being: use the feature iteratively to feed the interesting block in the preimage back into -S, and keep going until you get the very first version of the block.
-G<regex>::
Look for differences whose patch text contains added/removed
Documentation/gitdiffcore.txt +0 -0
@@ -222,25 +222,27 @@ version prefixed with '+'.
diffcore-pickaxe: For Detecting Addition/Deletion of Specified String
---------------------------------------------------------------------
[-There are two kinds of pickaxe:-]{+This transformation limits+} the [-S kind (corresponding-]{+set of filepairs+} to [-'git log-] [--S')-]{+those that change+}
{+specified strings between the preimage+} and the [-G kind (mnemonic: grep; corresponding-]{+postimage in a certain+} {+way. -S<block of text> and -G<regular expression> options are used+} to
[-'git log -G').-]{+specify different ways these strings are sought.+}
"-S<block of text>" detects filepairs whose preimage and postimage
have different number of occurrences of the specified block of text.
By definition, it will not detect in-file moves. Also, when a
changeset moves a file wholesale without affecting the interesting
string, [-rename detection-]{+diffcore-rename+} kicks in as usual, and -S omits the filepair (since the number of occurrences of that string didn't change in that
rename-detected filepair).[-The implementation essentially-]
[-runs a count, and is significantly cheaper than the G kind.-] When used with --pickaxe-regex, treat the <block of text> as an extended POSIX regular expression to match,
instead of a literal string.
"-G<regular expression>" {+(mnemonic: grep)+} detects filepairs whose textual diff has an added or a deleted line that matches the given regular expression. This means that it [-can-]{+will+} detect in-file (or what rename-detection considers the same file) [-moves.-]{+moves, which is noise.+} The implementation runs diff twice and greps, and this can be quite expensive.
When -S or -G are used without --pickaxe-all, only filepairs that match their respective criterion are kept in the output. When
Ramkumar Ramachandra (2):
diffcore-pickaxe: make error messages more consistent diffcore-pickaxe doc: document -S and -G properly
Documentation/diff-options.txt | 38 +++++++++++++++++++++++++++-------- Documentation/gitdiffcore.txt | 45 +++++++++++++++++++++++++----------------- diffcore-pickaxe.c | 4 ++-- 3 files changed, 59 insertions(+), 28 deletions(-)
Signature · 1 line
1.8.3.114.gcd03571