Re: [PATCH v2 0/6] Teach '--column-number' to 'git-grep(1)'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 23, 2018, 13:46 UTC
- Message-ID
- <xmqq7eoy9gs9.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180422233403.GE48072@syl.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 10 quoted lines
>> It seems that these two used to be "even when it is configured not >> to show linenumber, with -n it is shown and without -n it is not, >> when the new --column-number feature forces the command to show the >> "filename plus colon plus location info plus coon" header. I'm >> guessing that the reason why these got changed this round is because >> the old way was found too defensive (perhaps nobody sets >> grep.linenumber in .git/config in the tests that come before these)? > ... > Do you think that it is worth testing --column-number with and without > grep.columnnumber as above?
I view the "git -c var.val=foo cmd" as a reasonable way to make sure that the test is not affected by any stale state in .git/config left behind by an earlier test that did "git config var.val bar" and then failed to clean itself up, but I do not think it is all that intereseting to test the inter-changeability between config and command line option "-n" while checking its interaction with another option e.g. "--column".