Re: [PATCH 2/3] reset: use DIFF_OPT_SET macro to set a diff flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29, Junio C Hamano wrote:
> Brandon Williams <bmwill@xxxxxxxxxx> writes:
> 
> > Instead of explicitly setting the 'DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG'
> > flag, use the 'DIFF_OPT_SET' macro.
> >
> > Signed-off-by: Brandon Williams <bmwill@xxxxxxxxxx>
> > ---
> 
> Looks good.  It's not like one of 1/3 and 2/3 could be a good idea
> while the other is not, so it would make a lot more sense to combine
> them into a single preliminary clean-up patch, though.  
> 

I'll squash them together in v2.

> In any case, these two are very good clean-up patches, whose value
> does not diminish even we do not go ahead with 3/3 yet.  
> 
> Nicely spotted; thanks.
> 
> 
> >  builtin/reset.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/builtin/reset.c b/builtin/reset.c
> > index 9cd89b230..ea2fad5a0 100644
> > --- a/builtin/reset.c
> > +++ b/builtin/reset.c
> > @@ -166,7 +166,7 @@ static int read_from_tree(const struct pathspec *pathspec,
> >  	opt.output_format = DIFF_FORMAT_CALLBACK;
> >  	opt.format_callback = update_index_from_diff;
> >  	opt.format_callback_data = &intent_to_add;
> > -	opt.flags |= DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG;
> > +	DIFF_OPT_SET(&opt, OVERRIDE_SUBMODULE_CONFIG);
> >  
> >  	if (do_diff_cache(tree_oid, &opt))
> >  		return 1;

-- 
Brandon Williams



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux