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

[PATCH 0/3] Close commit-graph before calling 'gc'

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
May 17, 2019, 18:41 UTC
Message-ID
<pull.208.git.gitgitgadget@gmail.com>

In Windows, the way we rename a lock file to replace the underlying file does not work when a process holds a read handle. For this reason, we call close_all_packs() everywhere before starting a git gc --auto subprocess. We also call close_commit_graph() before renaming the commit-graph lock file. But we don't close the commit-graph handles before running gc, which can cause an issue when gc.writeCommitGraph is enabled.

This series adds close_commit_graph() to close_all_packs() and then renames close_all_packs() to close_object_store(). This name is more descriptive of its larger purpose.

This is based on ds/commit-graph-write-refactor to avoid conflicts.
Thanks, -Stolee
Derrick Stolee (3):
  commit-graph: use raw_object_store when closing
  packfile: close commit-graph in close_all_packs
  packfile: close_all_packs to close_object_store
 builtin/am.c           | 2 +-
 builtin/clone.c        | 2 +-
 builtin/fetch.c        | 2 +-
 builtin/gc.c           | 4 ++--
 builtin/merge.c        | 2 +-
 builtin/rebase.c       | 2 +-
 builtin/receive-pack.c | 2 +-
 builtin/repack.c       | 2 +-
 commit-graph.c         | 8 ++++----
 commit-graph.h         | 2 +-
 object.c               | 2 +-
 packfile.c             | 5 ++++-
 packfile.h             | 2 +-
 upload-pack.c          | 2 +-
 14 files changed, 21 insertions(+), 18 deletions(-)
base-commit: 8520d7fc7c6edd4d71582c69a873436029b6cb1b
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-208%2Fderrickstolee%2Fclose-graph-everywhere-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-208/derrickstolee/close-graph-everywhere-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/208
-- 
gitgitgadget
Next: Derrick Stolee via GitGitGadget
Message 1 of 11 in “Close commit-graph before calling 'gc'”
  1. 0/3 Close commit-graph before calling 'gc'Derrick Stolee via GitGitGadget, May 17, 2019
  2. 1/3 commit-graph: use raw_object_store when closingDerrick Stolee via GitGitGadget, May 17, 2019
  3. 2/3 packfile: close commit-graph in close_all_packsDerrick Stolee via GitGitGadget, May 17, 2019
  4. 3/3 packfile: close_all_packs to close_object_storeDerrick Stolee via GitGitGadget, May 17, 2019
  5. Johannes SchindelinMay 20, 2019
  6. Derrick StoleeMay 20, 2019
  7. Junio C HamanoMay 28, 2019
  8. Junio C HamanoMay 19, 2019
  9. Johannes SchindelinMay 20, 2019
  10. Derrick StoleeMay 20, 2019
  11. Johannes SchindelinMay 20, 2019

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.