Re: [PATCH 3/5] diff: acknowledge --submodule=short command-line option

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

 



Jens Lehmann wrote:
> Am 02.10.2012 18:51, schrieb Ramkumar Ramachandra:
>> Currently, the diff code does not differentiate between an explicit
>> '--submodule=short' being passed, and no submodule option being passed
>> on the command line.  Making this differentiation will be important
>> when the command-line option can be used to override a
>> "diff.submoduleFormat" configuration variable introduced in the next
>> patch.
>
> Wouldn't it be sufficient here to simply reset the log flag by using
> "DIFF_OPT_CLR(options, SUBMODULE_LOG)"? This would avoid having to
> use the last bit of the diffopt flags. And if I read the code correctly,
> diff_opt_parse() is called by setup_revisions() which is called after
> git_config(), so that should be safe. (And "textconv" uses the same
> approach)

How is it sufficient?  In git_diff_ui_config(), I set
submodule_format_cfg, which has nothing to do with SUBMODULE_LOG.  In
builtin_diff(), I'll have to check SUBMODULE_LOG and
submodule_format_cfg.  The tricky bit is that I should check
submodule_format_cfg if and only if "--submodule=short" was NOT passed
on the command line-  now, that's not the same thing is checking if
SUBMODULE_LOG is unset, because SUBMODULE_LOG is unset (or cleared) if
no argument was passed or if "--submodule=short" is passed.
Therefore, I need a SUBMODULE_SHORT to differentiate between the two
cases.

What am I missing?

Ram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]