From: Junio C Hamano <gitster@pobox.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] git status: Fix false positive "new commits" output for dirty submodules
Date: Thu, 11 Mar 2010 12:04:13 -0800 [thread overview]
Message-ID: <7v3a061v7m.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4B9909F6.5090104@web.de> (Jens Lehmann's message of "Thu\, 11 Mar 2010 16\:19\:18 +0100")
Jens Lehmann <Jens.Lehmann@web.de> writes:
> Another way to fix this bug would have been to enter the correct sha1
> into two->sha1 for submodules with new commits.
I didn't follow all the codepaths involved, but it might be worth a try.
The beginning of the patch may look something like this, and then you
would probably have to fix potential fallouts in diff.c from this change.
diff-lib.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/diff-lib.c b/diff-lib.c
index d7e13cb..a147d9c 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -182,10 +182,9 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
&& !DIFF_OPT_TST(&revs->diffopt, IGNORE_SUBMODULES)
&& (!changed || (revs->diffopt.output_format & DIFF_FORMAT_PATCH))
&& is_submodule_modified(ce->name)) {
- changed = 1;
dirty_submodule = 1;
}
- if (!changed) {
+ if (!changed && !dirty_submodule) {
ce_mark_uptodate(ce);
if (!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))
continue;
next prev parent reply other threads:[~2010-03-11 20:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 15:19 [PATCH] git status: Fix false positive "new commits" output for dirty submodules Jens Lehmann
2010-03-11 20:04 ` Junio C Hamano [this message]
2010-03-11 20:16 ` Junio C Hamano
2010-03-12 21:23 ` [PATCH v2] " Jens Lehmann
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=7v3a061v7m.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.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.
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).