All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 3/5] diff: acknowledge --submodule=short command-line option
Date: Sun, 07 Oct 2012 21:55:40 +0200	[thread overview]
Message-ID: <5071DE3C.5080206@web.de> (raw)
In-Reply-To: <5071DCC8.50004@web.de>

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);

  reply	other threads:[~2012-10-07 19:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 16:51 [PATCH 0/5] submodule: introduce diff.submoduleFormat Ramkumar Ramachandra
2012-10-02 16:51 ` [PATCH 1/5] Documentation: move diff.wordRegex from config.txt to diff-config.txt Ramkumar Ramachandra
2012-10-02 16:51 ` [PATCH 2/5] Documentation: sort diff-config.txt alphabetically Ramkumar Ramachandra
2012-10-02 16:51 ` [PATCH 3/5] diff: acknowledge --submodule=short command-line option Ramkumar Ramachandra
2012-10-02 19:24   ` Jens Lehmann
2012-10-07 15:22     ` Ramkumar Ramachandra
2012-10-07 19:49       ` Jens Lehmann
2012-10-07 19:55         ` Jens Lehmann [this message]
2012-10-02 16:51 ` [PATCH 4/5] diff: introduce diff.submoduleFormat configuration variable Ramkumar Ramachandra
2012-10-02 19:44   ` Jens Lehmann
2012-10-03 13:45     ` Jens Lehmann
2012-10-29 10:30       ` Ramkumar Ramachandra
2012-10-30 21:26         ` Jens Lehmann
2012-10-02 16:51 ` [PATCH 5/5] submodule: display summary header in bold Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5071DE3C.5080206@web.de \
    --to=jens.lehmann@web.de \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.