@@ -145,8 +145,8 @@ This edition covers what happened during the month of July 2020.
145
145
>
146
146
> But none of that is exposed via the command-line of "git log". I think
147
147
> it would be possible to do so, but I'm not sure how tricky it would be
148
- > (certainly one complication is that "- -not" already means something else
149
- > there, but presumably we could have "- -grep-and", "- -grep-not", etc).
148
+ > (certainly one complication is that "\-\ - not" already means something else
149
+ > there, but presumably we could have "\-\ - grep-and", "\-\ - grep-not", etc).
150
150
151
151
The idea of introducing ` --grep-and ` and ` --grep-not ` to disambiguate from ` --not ` (which
152
152
means something completely different for the log family) is
@@ -165,33 +165,33 @@ This edition covers what happened during the month of July 2020.
165
165
> of course "git grep" and because it is line oriented, we have quite
166
166
> a rich set of operations and combinations to say things like "if a
167
167
> line has X and Y on it in any order, but not Z on it, then the line
168
- > is a match." That is what "- -not", "- -and", "- -or" (not exposed to
168
+ > is a match." That is what "\-\ - not", "\-\ - and", "\-\ - or" (not exposed to
169
169
> the "git log" interface) express and we even take "(" and ")" for
170
- > grouping, e.g. "( X - -or Y ) - -and - -not Z".
170
+ > grouping, e.g. "( X \-\ - or Y ) \-\ - and \-\ - not Z".
171
171
>
172
172
> Another level of combination is to determine if the entire document
173
173
> matches. It often happens that you want to find a document with
174
- > both X and Y in it, and "grep -e X - -and -e Y" is * NOT* a way to do
175
- > so---the "- -and" is a line-level combinator and tells the machinery
174
+ > both X and Y in it, and "grep -e X \-\ - and -e Y" is \ * NOT\ * a way to do
175
+ > so --- the "\-\ - and" is a line-level combinator and tells the machinery
176
176
> to find lines that have both X and Y on them.
177
177
>
178
178
> We have a fairly ad-hoc single mechanism for boolean combination at
179
- > this level and that is the "- -all-match" option, which says "Look at
179
+ > this level and that is the "\-\ - all-match" option, which says "Look at
180
180
> the boolean expression you used to find each matching line, and
181
181
> separate them at the OR operator at the top level. Now, apply the
182
182
> matching logic to all lines in a document and see if _ all_ the
183
183
> clauses joined by the top-level OR operators matched at least once.
184
184
> If yes, then the document matches."
185
185
>
186
- > That is how "git grep - -all-match -e X -e Y" finds documents that
186
+ > That is how "git grep \-\ - all-match -e X -e Y" finds documents that
187
187
> refer to both X and Y but not necessarily on the same line.
188
188
>
189
- > There is not much room for the line-level "- -not" operator to
190
- > participate in this picture. "git grep -e X - -not -e Y" would mean
189
+ > There is not much room for the line-level "\-\ - not" operator to
190
+ > participate in this picture. "git grep -e X \-\ - not -e Y" would mean
191
191
> "find lines that has X, or that does not have Y", so as long as a
192
192
> document has one line with X on it and one line (which can be but
193
193
> does not have to be the same line) that does not have Y on it, the
194
- > variant of that search with "- -all-match" in it would say "yup the
194
+ > variant of that search with "\-\ - all-match" in it would say "yup the
195
195
> doc matches". But that is definitely not what the user who wants to
196
196
> say "if a doc has X in it, I want to see it, but I do not want to
197
197
> see it if it also has Y" wants to see.
0 commit comments