From: Sam Vilain <sam@vilain.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Fix rev-list when showing objects involving submodules
Date: Tue, 13 Nov 2007 08:54:08 +1300 [thread overview]
Message-ID: <4738AF60.90207@vilain.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0711112335020.4362@racer.site>
Johannes Schindelin wrote:
> The function mark_tree_uninteresting() assumed that the tree entries
> are blob when they are not trees. This is not so. Since we do
> not traverse into submodules (yet), the gitlinks should be ignored.
>
> diff --git a/revision.c b/revision.c
> index 931f978..81b5a93 100644
> --- a/revision.c
> +++ b/revision.c
> @@ -69,7 +69,7 @@ void mark_tree_uninteresting(struct tree *tree)
> while (tree_entry(&desc, &entry)) {
> if (S_ISDIR(entry.mode))
> mark_tree_uninteresting(lookup_tree(entry.sha1));
> - else
> + else if (!S_ISGITLINK(entry.mode))
> mark_blob_uninteresting(lookup_blob(entry.sha1));
> }
>
>
Wouldn't it be better to check for what it is, rather than what it is not?
Sam.
next prev parent reply other threads:[~2007-11-12 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 23:35 [PATCH] Fix rev-list when showing objects involving submodules Johannes Schindelin
2007-11-12 19:54 ` Sam Vilain [this message]
2007-11-12 20:21 ` Johannes Schindelin
2007-11-12 20:43 ` Linus Torvalds
2007-11-12 21:25 ` 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=4738AF60.90207@vilain.net \
--to=sam@vilain.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).