git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix rev-list when showing objects involving submodules

From
Sam Vilain <sam@vilain.net>
Date
Nov 12, 2007, 19:54 UTC
Message-ID
<4738AF60.90207@vilain.net>
In-Reply-To
<Pine.LNX.4.64.0711112335020.4362@racer.site>
Johannes Schindelin wrote:
Show 18 quoted lines
> 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.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 5 in “Fix rev-list when showing objects involving submodules”
  1. Fix rev-list when showing objects involving submodulesJohannes Schindelin, Nov 11, 2007
  2. Sam VilainNov 12, 2007
  3. Johannes SchindelinNov 12, 2007
  4. Linus TorvaldsNov 12, 2007
  5. Johannes SchindelinNov 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.