Thread (1 message) 1 message, 1 author, 2020-09-22

Re: [PATCH 3/3] commit: add an option the reword HEAD

From: Junio C Hamano <hidden>
Date: 2020-09-22 16:54:19

Phillip Wood [off-list ref] writes:
quoted
quoted
quoted
quoted
+test_reword_opt () {
...
... I should probably check that nothing is printed to stdout in
these tests
Perhaps, but that is not the point of "do we diagnose options thare
are incompatble with --reword?" test.
I think it depends if one views the test as checking "do we diagnose
options there are incompatible with --reword?" or "what do we show the 
user when there are options that are incompatible with --reword". For
the former we just want to check that the correct error message is 
printed, for the latter we want to check that only what we expect to
be printed is actually printed.
I dunno.  It is plausible that we will further give some advices
(not directly related to --reword option being incompatible with
other options) and output may evolve.  I do not think we want to be
updating each and every test that expects exact output.

In other words, the answer to "what do we show when --reword and
another incompatible option are given?" is "we want to point it out
that --reword and --amend are not to be used together" and not "and
we should not ever say anything else".

Just like back when we started making sure everybody sets user.name
configuration variable (and the way to do so was to give warnings
and advices at strategic places), output can be added to commands
where authors if each individual feature would not expect.  I would
want to see our tests prepared for such an occasion.  We cannot be
perfectly prepared, of course, but keeping the expectation focused
enough to check what really matters for the objective at hand would
help.

Thanks.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help