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

Question about unpack-trees.c and tree_entry_list

From
David Kastrup <dak@gnu.org>
Date
Jul 22, 2007, 16:17 UTC
Message-ID
<85d4ykjtuc.fsf@lola.goethe.zz>
The definition of tree_entry_list ist the following
struct tree_entry_list {
	struct tree_entry_list *next;
	unsigned directory : 1;
	unsigned executable : 1;
	unsigned symlink : 1;
	unsigned int mode;
	const char *name;
	const unsigned char *sha1;
};

but it appears to me that the only of the bit fields that is used at all is "directory" : all other uses revert to "mode" which directory presumably could do as well.

Is there something I am overlooking?
-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Next: René Scharfe
Message 1 of 2 in “Question about unpack-trees.c and tree_entry_list”
  1. David KastrupJul 22, 2007
  2. cleanup unpack-trees.c: shrink struct tree_entry_listRené Scharfe, Jul 24, 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.