Victor Leschuk <vlesc...@accesssoftek.com> writes:

> We already do have some of these: 'no-metadata', 'no-checkout',
> no-auth-cache'. So I was just following the existing convention. Do
> you think we need to change it and stick with
> --catch-file-batch=1/--cat-file-batch=0 ?

Inventing a new --cat-file-batch=[0|1] is not a good idea, and
certainly not what I would suggest at all.

My suggestion was to accept --cat-file-batch to allow the --batch
processing, and to accept--no-cat-file-batch to trigger your new
codepath (and leave --cat-file-batch the default when neither is
given).  As these option descriptions are eventually passed to
Getopt::Long, I thought it should not be too hard to arrange.

Mimicking the existing handling of no-whatever is less bad than
accepting --cat-file-batch=[0|1], if you cannot tell the code to
take --[no-]cat-file-batch for whatever reason.  In the longer term
it would need to be cleaned up together with existing ones.  Your
patch would be adding another instance that needs to be cleaned up
to that existing pile, but as long as it follows the same pattern as
existing ones, it is easier to spot what needs to be fixed later.
Compared to that, accepting --cat-file-batch=[0|1] would be far
worse, as such a future clean-up effort can miss it due to its not
following the same pattern.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to