From: Jonathan Nieder Date: Wed, 06 Jul 2011 09:20:09 GMT Subject: Re: [PATCH 09/14] revert: Don't create invalid replay_opts in parse_args Message-ID: <20110706092009.GF15682@elie> In-Reply-To: <1309938868-2028-10-git-send-email-artagnon@gmail.com> Ramkumar Ramachandra wrote: > The "--ff" command-line option cannot be used with four other > command-line options. However, when these options are specified with > "--ff" on the command-line, parse_args will still parse these > incompatible options into a replay_opts structure for use by the rest > of the program. Although pick_commits checks the validity of the > replay_opts strucutre before before starting its operation, this is > inelegant design; pick_commits is currently the gatekeeper to the > cherry-pick machinery, but this will change in future. To futureproof > the code and catch these errors in one place, make sure that an > invalid replay_opts structure is not created by parse_args in the > first place. Also ensure that regressions in maintaining this > invariant are caught in the future by adding an assertion in > pick_commits. Agh! The above seems totally convoluted, and worse, I can see some of my own words in there so I feel I am to blame. Could you please explain, simply, as though I am just an ordinary person, what the idea of this patch is? I've heard you talk before. You are quite capable of explaining things clearly. The patch itself looks good.