Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2] git-remote-mediawiki: bugfix for pages w/ >500 revisions

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:58:53

Benoit Person [off-list ref] writes:
quoted
d17cf5f3a32f07bf (tests: Introduce test_seq;  2012-08-03)
quoted
+       do
+               echo "creating revision $i"
Do you want to end this line with '&&'?
The way it's intended is that it's more a debug information to see how
it's going on (creating >500 revs is *quite* long). If I understand it
correctly, using '&&' would mean that the return value of the echo
statement will be tested for success ? Anyway, I am not sure it makes
sense to fail on a "debug echo" ?
I don't think you should bother with such reasoning: just put the &&
everywhere.

Without the &&, it's OK in the current version, but what if someone adds
something before the echo? Then it becomes

git something-important &&
echo debug
git something-else-important

and a failure on the first call is unnoticed because of the missing &&
afterwards.

The echo is not supposed to fail, so either the && does not change
anything, or something went terribly wrong and you'd rather notice it.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help