From: Ronald Weiss Date: Mon, 31 Mar 2014 21:50:17 GMT Subject: Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter Message-ID: In-Reply-To: <5339D213.4070303@web.de> On Mon, Mar 31, 2014 at 10:37 PM, Jens Lehmann wrote: > ... maybe the best way is to leave index_differs_from() unchanged > and call that function with the correct diff_flags instead: > > + int diff_flags = DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG; > + if (ignore_submodule_arg && > + !strcmp(ignore_submodule_arg, "all")) > + diff_flags |= DIFF_OPT_IGNORE_SUBMODULES; > + commitable = index_differs_from(parent, diff_flags); > > Not thoroughly tested yet, but that'd also prevent any fallout for > the two callsites of index_differs_from() in sequencer.c. Thanks for this hint, that is really much nicer. I'll test that, and post updated patch if it works.