Skip to contentSkip to conversation

Correct documentation wording for diff options -S and --pickaxe-all

PATCH In review Heikki Orsila 3 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Correct documentation wording for diff options -S and --pickaxe-all

---
 Documentation/diff-options.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Documentation/diff-options.txt +3 -3
index 1759386..062a8ae 100644
@@ -160,12 +160,12 @@ endif::git-format-patch[]
 	number.
 
 -S<string>::
-	Look for differences that contain the change in <string>.
+	Look for differences that contain <string> in the change.
 
 --pickaxe-all::
 	When -S finds a change, show all the changes in that
-	changeset, not just the files that contain the change
-	in <string>.
+	changeset, not just the files that contain <string>
+	in the change.
 
 --pickaxe-regex::
 	Make the <string> not a plain string but an extended POSIX
Signature · 1 line
1.6.0.1
#1 lore raw
Quoted 12 lines · Heikki Orsila
---
 Documentation/diff-options.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Documentation/diff-options.txt +0 -0
index 1759386..062a8ae 100644
@@ -160,12 +160,12 @@ endif::git-format-patch[]
 	number.
 

Documentation/diff-options.txt endif::git-format-patch[] · line 168

Quoted 10 lines
Documentation/diff-options.txt +3 -3
 -S<string>::
-	Look for differences that contain the change in <string>.
+	Look for differences that contain <string> in the change.
 
 --pickaxe-all::
 	When -S finds a change, show all the changes in that
-	changeset, not just the files that contain the change
-	in <string>.
+	changeset, not just the files that contain <string>
+	in the change.

Thanks, but if we are doing this, we should reword it to something less misleading. The pickaxe search does not look for changes that contains string in the sense people might expect (e.g. "diff -u0 | grep string").

The machinery looks at the old and new copy, and considers it a match if they have different numbers of "string" in them.

So perhaps something like this

-S<string>::
Look for differences that changes the number of <string> in the file.

--pickaxe-all::
When -S finds a change, show all the changes in that changeset, not just the files for which the number of <string> in them changes.

but I am bad at writing, so I'll ask others to come up with a better wording.

#2 lore raw
Quoted 13 lines · Junio C Hamano

Thanks, but if we are doing this, we should reword it to something less misleading. The pickaxe search does not look for changes that contains string in the sense people might expect (e.g. "diff -u0 | grep string").

The machinery looks at the old and new copy, and considers it a match if they have different numbers of "string" in them.

So perhaps something like this

-S<string>::
Look for differences that changes the number of <string> in the file.

Quoted 7 lines

--pickaxe-all::
When -S finds a change, show all the changes in that changeset, not just the files for which the number of <string> in them changes.

but I am bad at writing, so I'll ask others to come up with a better wording.

Perhaps like this:

-S:
"Look for differences that change the number of <string> matches in a file. In other words, moving the <string> inside a file does not imply a match, but adding or removing <string> will."

Signature · 3 lines
Heikki Orsila
[email protected]
http://www.iki.fi/shd