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

[PATCH/RFC 0/2] close packs files when they are not needed

From
Max Kirillov <max@max630.net>
Date
Oct 1, 2015, 03:29 UTC
Message-ID
<1443670163-31193-1-git-send-email-max@max630.net>
In-Reply-To
<xmqqlhbn7ky1.fsf@gitster.mtv.corp.google.com>
> The right approach may to have a helper in sha1_file.c that closes
> and cleans up _all_ packs, and call it from here, instead of having
> builtin/clone.c even know about implementation details such as
> packed_git is a linked list, etc. 
Like this?

Note I did not test it to actually work for the current code. Trying now what I could do with lsof, just to be sure myself, but probably its use not appropriate for the project.

Max Kirillov (2):
  sha1_file: close all pack files after running
  sha1_file: set packfile to O_CLOEXEC at open
 builtin/pack-objects.c |  2 +-
 cache.h                |  3 +-
 git.c                  |  2 ++
 pack-bitmap.c          |  2 +-
 sha1_file.c            | 80 +++++++++++++++++++++++++++++++++++---------------
 5 files changed, 63 insertions(+), 26 deletions(-)
-- 
2.3.4.2801.g3d0809b
Next: Max Kirillov
Message 1 of 12 in “close packs files when they are not needed”
  1. 0/2 close packs files when they are not neededMax Kirillov, Oct 1, 2015
  2. 1/2 sha1_file: close all pack files after runningMax Kirillov, Oct 1, 2015
  3. Johannes SchindelinOct 2, 2015
  4. Johannes SchindelinOct 2, 2015
  5. Max KirillovOct 2, 2015
  6. Johannes SchindelinOct 4, 2015
  7. Max KirillovOct 5, 2015
  8. Johannes SchindelinOct 5, 2015
  9. Max KirillovOct 2, 2015
  10. Max KirillovOct 2, 2015
  11. 2/2 sha1_file: set packfile to O_CLOEXEC at openMax Kirillov, Oct 1, 2015
  12. Johannes SchindelinOct 2, 2015

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.