git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 3/5] diff: acknowledge --submodule=short command-line option
Date: Sun, 7 Oct 2012 20:52:05 +0530	[thread overview]
Message-ID: <CALkWK0mbQZjYUR73rdFP2BtOzdL9gQqxnC5fjtsCYq2F29=8qg@mail.gmail.com> (raw)
In-Reply-To: <506B3F74.3020208@web.de>

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

  reply	other threads:[~2012-10-07 15:29 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 [this message]
2012-10-07 19:49       ` Jens Lehmann
2012-10-07 19:55         ` Jens Lehmann
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CALkWK0mbQZjYUR73rdFP2BtOzdL9gQqxnC5fjtsCYq2F29=8qg@mail.gmail.com' \
    --to=artagnon@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).