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

Re: [PATCH 1/4] add mode parameter to get_sha1

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 21, 2007, 20:02 UTC
Message-ID
<20070421200239.GA2437@steel.home>
In-Reply-To
<1177158380197-git-send-email-mkoegler@auto.tuwien.ac.at>
Martin Koegler, Sat, Apr 21, 2007 14:26:17 +0200:
> If the mode parameter is not NULL, get_sha1 will store
> the mode of the object in it.

It looks like the number of call sites which actually use the argument is vanishingly small compared to the number of sites where it is set to NULL. Why don't you introduce a new function instead, say get_sha1_and_mode, and use it for this two or three places?

Previous: Junio C Hamano
Message 6 of 6 in “add mode parameter to get_sha1”
  1. 1/4 add mode parameter to get_sha1Martin Koegler, Apr 21, 2007
  2. 2/4 add support for storing the mode in object_arrayMartin Koegler, Apr 21, 2007
  3. 3/4 add mode to add_pending_objectMartin Koegler, Apr 21, 2007
  4. 4/4 use the mode information of the tree, if <SHA1>:file name syntax is usedMartin Koegler, Apr 21, 2007
  5. Junio C HamanoApr 21, 2007
  6. Alex RiesenApr 21, 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.