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

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

 



Am 07.10.2012 21:49, schrieb Jens Lehmann:
> I forgot to mention that testing submodule_format_cfg would have to
> happen in cmd_diff() (between reading the config and parsing the
> command line options) instead of builtin_diff(). Something like this
> should do the trick (untested):
> 
> diff --git a/builtin/diff.c b/builtin/diff.c
> index 9650be2..180bf44 100644
> --- a/builtin/diff.c
> +++ b/builtin/diff.c
> @@ -297,6 +297,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix
>         DIFF_OPT_SET(&rev.diffopt, ALLOW_EXTERNAL);
>         DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
> 
> +       if (submodule_format_cfg && !strcmp(submodule_format_cfg, "log"))
> +               DIFF_OPT_SET(options, SUBMODULE_LOG);

Obviously not even compile tested, the line above should read:

+               DIFF_OPT_SET(&rev.diffopt, SUBMODULE_LOG);

> +
>         if (nongit)
>                 die(_("Not a git repository"));
>         argc = setup_revisions(argc, argv, &rev, NULL);


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