From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] diff options: Introduce --ignore-submodules
Date: Wed, 14 May 2008 11:28:48 -0700 [thread overview]
Message-ID: <7vbq38oi3j.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0805141803240.30431@racer> (Johannes Schindelin's message of "Wed, 14 May 2008 18:03:31 +0100 (BST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> @@ -3355,6 +3357,9 @@ void diff_addremove(struct diff_options *options,
> char concatpath[PATH_MAX];
> struct diff_filespec *one, *two;
>
> + if (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(mode))
> + return;
> +
> /* This may look odd, but it is a preparation for
> * feeding "there are unchanged files which should
> * not produce diffs, but when you are doing copy
So both removal and addition of a submodule is an uninteresting event.
> @@ -3399,6 +3404,10 @@ void diff_change(struct diff_options *options,
> char concatpath[PATH_MAX];
> struct diff_filespec *one, *two;
>
> + if (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(old_mode)
> + && S_ISGITLINK(new_mode))
> + return;
And a submodule changing from revision A to B is uninteresting.
Is it interesting if something that used to be a blob turns into a
submodule, or vice versa? The code says it is, but I think it would be
more convenient to treat it as a removal of blob and addition of a
submodule.
next prev parent reply other threads:[~2008-05-14 18:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 17:03 [PATCH 0/3] sane rebase/stash support with submodules Johannes Schindelin
2008-05-14 17:03 ` [PATCH 1/3] diff options: Introduce --ignore-submodules Johannes Schindelin
2008-05-14 18:28 ` Junio C Hamano [this message]
2008-05-14 18:42 ` Johannes Schindelin
2008-05-14 19:17 ` Junio C Hamano
2008-05-14 22:09 ` Johannes Schindelin
2008-05-14 22:12 ` Junio C Hamano
2008-05-15 1:09 ` Johannes Schindelin
2008-05-15 1:50 ` Junio C Hamano
2008-05-15 13:58 ` Johannes Schindelin
2008-05-14 17:03 ` [PATCH 2/3] Teach update-index about --ignore-submodules Johannes Schindelin
2008-05-14 17:03 ` [PATCH 3/3] Ignore dirty submodule states during rebase and stash Johannes Schindelin
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=7vbq38oi3j.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.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.
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).