Re: [RFC/PATCH 2/4] replace: use OPT_CMDMODE to handle modes
- From
Jeff King <peff@peff.net>
- Date
- Mar 6, 2014, 18:48 UTC
- Message-ID
- <20140306184801.GA30890@sigill.intra.peff.net>
- In-Reply-To
- <CAP8UFD2c0UKT8Uyw4j9SzKGx2oLn=o7N-dtvQHPaaBtLT6ggcw@mail.gmail.com>
On Thu, Mar 06, 2014 at 07:35:19PM +0100, Christian Couder wrote:
> > + if (!cmdmode) > > + cmdmode = argc ? MODE_REPLACE : MODE_DELETE; > > Shouldn't it be MODE_LIST instead of MODE_DELETE?
Argh, yes, thank you for catching. My original iteration used chars like 'd' and 'l' (similar to other uses of OPT_CMDMODE). I switched it at the last minute to an enum, and somehow thinko'd that completely (and obviously did not run the tests again afterwards).
-Peff