Le Sat, 10 Apr 2010 12:12:58 -0700,
That sounding a bit harsh, I guess it is my turn to take the blame for
One practical advantage of this warning would be, in the very case of
adding meaning to an additional -C, that a user trying to use it on an
older version of git would get a warning that the program might not
indeed to what the user requested.
However, my first feeling was simply that, while it is usually harmless
to let the user specify a flag several time, when it changes nothing,
the situation is different when repetition of the flag is important -
it is closer to an invalid flag combination.
In fact, I even dislike that use of repetitive -C. One could argue
that it is much like repetition of -v used in various programs to raise
verbosity. But well, in our case, it is much more than just increasing
the level of details, it makes it use a different mechanism - even if
each time it is a superset of the previous one.
And what if someone comes with an idea of a "level of -C" that indeed
lays between two existing ones ? Will we shift the meaning of the
existing ones ? And what about one "level" that would not strictly fit
in the existing "superset" chain ?
What about instead using a more descriptive flag ? That would be more
verbose typing, but then we can still keep the existing flags for
backward compatibility, and we also have shell command-line completion.
I'd think about something like:
-C -C -> -Cunmodified (that one also for diff)
-C -C -C -> -Chistory
I could also argue that "blame -M" could also be better placed as a -C
variant (it is also supposed to detect some copies), and could have as
Well, the warning should trigger the 1st time that somebody tests his
fourth -C, right ?
--
Yann
--