Re: [PATCH 0/7] grep.c: teach --column to 'git-grep(1)'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 19, 2018, 20:51 UTC
- Message-ID
- <xmqq7emuv6s4.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <385b429e-5d57-91c0-054c-0f04c59538e3@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 10 quoted lines
> So let's see what your example does: > > $ git grep --column --not \( --not -e foo --or --not -e bar \) trace.h > trace.h:13: * #define foo(format, ...) bar(format, __VA_ARGS__) > $ git grep --column --not \( --not -e bar --or --not -e foo \) trace.h > trace.h:13: * #define foo(format, ...) bar(format, __VA_ARGS__) > > Impressive. That expression is confusing at first sight, but showing > the first matching column anyway requires no further explanation. I > like it.
OK, obviously many people are a lot more math/logic minded than I am. I still think that any code that attempts to show the same result as '-e bar --and -e foo' from the above is over-engineered, but as long as it is done corretly and efficiently I won't have any objection.
Thanks.