From: Jeff King Date: Tue, 15 Feb 2011 07:21:48 GMT Subject: Re: [PATCH 6/7] commit,status: describe -u likewise Message-ID: <20110215072148.GC28634@sigill.intra.peff.net> In-Reply-To: <4D5A22D3.2080605@warpmail.net> On Tue, Feb 15, 2011 at 07:53:07AM +0100, Michael J Gruber wrote: > > I however wonder if we have an opportunity for even more unifying > > these two arrays, typing the same thing only once. > > I was surprised we have two arrays at all, "status" being "commit > --dry-run". I'll check whether we can remove redundancy without too > much effort. Hmm, not according to 9e4b7ab (git status: not "commit --dry-run" anymore, 2009-08-15). "Commit --dry-run" more-or-less runs status on the index that would be committed. But it obviously takes a lot of options that status does not, and in theory status could take options that "commit --dry-run" does not (certainly its non-option arguments are different these days, but parse_options doesn't care about that). I said "in theory" because I have no idea if such options exist yet or not. But probably any refactoring should pull out the common options into a shared list, and not simply make commit a superset of the status options. -Peff