Re: [PATCH 09/13] revert: Catch incompatible command-line options early
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 2, 2011, 09:53 UTC
- Message-ID
- <20110702095334.GA19090@elie>
- In-Reply-To
- <BANLkTinN6KdPnuMWbrdE4jf4ijKDC=35Aw@mail.gmail.com>
Hi Ram,
Ramkumar Ramachandra wrote:
> Jonathan Nieder writes:
Show 20 quoted lines
>> The naive reader (i.e., me) wonders: how long does this option parsing >> and populating the options structure that we want to delay until after >> verify_opt_compatible take? Does that delay matter or is there some >> other reason for this change? > > I've tried to spell out the motivation for this change more clearly in > my latest iteration. Does this look alright? > > revert: Catch incompatible command-line options in parse_args > > Some incompatible command-line options are caught in pick_commits > after parse_args has parsed the options and populated the options > structure. Change this so that parse_args only parses valid > command-line options instead of returning an unusable options > structure. However, this does not mean that we will never need to > check the options structure; when a sequencer API is written future, > callers will call in with a pre-populated options structure whose > validity we will still need to check. Also, provide a > verify_opt_compatible function to handle incompatible options in a > general manner.
Alas, I still don't get it. How can I (the fearful reader) demonstrate the problem that this fixes? Is it a big problem? How does the patch fix it? Does the patch have downsides, or is it mostly risk-free?