git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Francis Moreau <francis.moro@gmail.com>
Cc: git@vger.kernel.org, Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: Adding "--ignore-submodules" switch to git-describe
Date: Fri, 08 Mar 2013 13:26:53 -0800	[thread overview]
Message-ID: <7vy5dxfuqq.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAC9WiBhHmqn7QZMLFcLjqGPamHmbMFNxvQ6Yzv5dr=+fe+F3_g@mail.gmail.com> (Francis Moreau's message of "Fri, 8 Mar 2013 21:04:30 +0100")

Francis Moreau <francis.moro@gmail.com> writes:

>> But when we ignore untracked paths in the superproject, we should
>> ignore untracked paths in submodule working trees consistently.
>
> yes I agree.
>
> But in the short term, could you suggest a method to workaround this
> inconsistency ?

Hrm, ... didn't I already?

    As we do not take untracked content at the superproject level into
    account when deciding "--dirty"-ness, I think it is very sensible to
    either do one of the following:

     (1) always ignore untracked files in submodule working trees; or

     (2) if we were to introduce some form of --ignore-submodules,
         ignore untracked files in the superproject working tree when we
         use that mechanism to ignore untracked files in submodule
         working trees.

    Strictly speaking, (1) is a degenerate case of (2).

    ...
    I think what is missing from "--dirty" is not "--ignore-submodules",
    but "--do-not-ignore-untracked" option [*1*].  "describe --dirty"
    ignores untracked files in the superproject by default, and we
    should ignore untracked files in submodule working trees, but the
    current code does not.  Fixing that is (1) above.

I think the right first step without any new option is to make
"describe --dirty" to ignore the dirtiness in submodules coming
solely from having untracked files in submodules' working trees.

You could later add --having-untracked-is-dirty option to mark the
output dirty when there is an untracked file in submodules' working
trees or the toplevel working tree, which would be the second step.

      reply	other threads:[~2013-03-08 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 10:16 Adding "--ignore-submodules" switch to git-describe Francis Moreau
2013-03-01 17:46 ` Junio C Hamano
2013-03-01 19:40   ` Jens Lehmann
2013-03-08 20:04   ` Francis Moreau
2013-03-08 21:26     ` Junio C Hamano [this message]

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=7vy5dxfuqq.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=francis.moro@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 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 NNTP newsgroup(s).