Re: [PATCH v4 1/6] submodule: Make 'checkout' update_module explicit
- From
W. Trevor King <wking@tremily.us>
- Date
- Jan 16, 2014, 20:19 UTC
- Message-ID
- <20140116201949.GX2647@odin.tremily.us>
- In-Reply-To
- <CALas-ig4=qKqpopaP163gVdBG39seWH61qqA5Jx0CR6AZkE6ZA@mail.gmail.com>
On Thu, Jan 16, 2014 at 09:07:22PM +0100, Francesco Pretto wrote:
Show 5 quoted lines
> 2014/1/16 W. Trevor King <wking@tremily.us>: > > Avoiding useless clones is probably more important than avoiding > > duplicate "Invalid update mode" messages. > > No, it's not duplicate code.
I meant “duplicating the "Invalid update mode" error message”. I missed the die-early distinction, but I understand now. I think its non-DRY to have an early case statement to validate the update_module, and a later case statement to use it. Still, keeping those separate statements in sync shouldn't be too hard ;).
> Please keep both as Junio said.
That's what I said I'd do in the email you're quoting ;). Are you ok with the die-early validation checking all update_module settings instead of just checking the loaded-from config branch?
Cheers, Trevor
-- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy