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

[PATCH] Remove redundant close_ref function

From
Ronnie Sahlberg <sahlberg@google.com>
Date
Apr 8, 2014, 21:17 UTC
Message-ID
<1396991830-20938-1-git-send-email-sahlberg@google.com>
List,

This is a trivial patch that removes the function close_ref() from refs.c. This function was only called from two codepaths and can be removed since both codepaths shortly afterwards both call unlock_ref() which implicitely closes the file anyway.

By removing this function we simplify the api to refs slightly. This also means that the lifetime of the filedescriptor becomes the same as the lifetime for the 'struct ref_lock' object. The filedescriptor is opened at the same time ref_lock is allocated and the descriptor is closed when ref_lock is released.

regards ronnie sahlberg

Next: Ronnie Sahlberg
Message 1 of 5 in “Remove redundant close_ref function”
  1. Remove redundant close_ref functionRonnie Sahlberg, Apr 8, 2014
  2. Remove the close_ref function.Ronnie Sahlberg, Apr 8, 2014
  3. Junio C HamanoApr 8, 2014
  4. Ronnie SahlbergApr 8, 2014
  5. Junio C HamanoApr 8, 2014

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.