Re: [PATCH v2.1] commit: add --ignore-submodules[=<when>] parameter
- From
- Ronald Weiss <weiss.ronald@gmail.com>
- Date
- Mar 31, 2014, 21:50 UTC
- Message-ID
- <CABxC_L88+eaQJUog0Bhj3EVE0A0NN=hh0heWogjuv2jve7Gx=A@mail.gmail.com>
- In-Reply-To
- <5339D213.4070303@web.de>
On Mon, Mar 31, 2014 at 10:37 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 11 quoted lines
> ... 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.