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

[RFC PATCH 0/5] So you dislike the sequence of system calls?

From
Stefan Beller <sbeller@google.com>
Date
Jan 22, 2015, 23:11 UTC
Message-ID
<1421968297-25407-1-git-send-email-sbeller@google.com>
In-Reply-To
<54C0DDE7.8030708@alum.mit.edu>
This series goes on top of origin/sb/atomic-push-fix for now.

I am inclined to squash the first patch into the last commit of origin/sb/atomic-push-fix when rerolling that series as it just fixes the warning Ramsay pointed out. I'd also like to combine this series with the origin/sb/atomic-push-fix in a reroll of either series such that it becomes one larger series.

The patches 2,3,4 are just preparations (no change intended) for the patch 5 which then corrects the sequence of system calls such that we don't close and reopen the lock file.

(Background: Why am I spending time to fix that bug the way I do?) I think writing out the sha1 early to the .lock file helps in further patch series for cross repository atomic pushes, because if we can split the transaction_commit into two parts, where the latter part only has lock file pathes in memory, dealing with cross repository ref updates becomes easy in such a way: (compare discussion [RFC] Introducing different handling for small/large transactions)

        cat << EOF > stdin_pipe
        delete topic2 2345
        update master 4567 2378
        repository ../API-consumer # this switches to another repository
        delete topic2 3459
        update master 6787 9878
        EOF
        git update-ref --stdin <stdin_pipe

Internally update-ref would be easy to implement when all you have left are lock files you'd need to commit.

Any feedback welcome!

Thanks, Stefan

Stefan Beller (5):
  fixup for "refs.c: enable large transactions"
  refs.c: remove unlock_ref from write_ref_sha1
  refs.c: move static functions to close and commit refs
  refs.c: remove committing the ref from write_ref_sha1
  refs.c: write values to lock files early for committing
 refs.c | 81 ++++++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 44 insertions(+), 37 deletions(-)
-- 
2.2.1.62.g3f15098
Previous: Stefan BellerNext: Stefan Beller
Message 13 of 45 in “[PATCHv2 0/5] Fix bug in large transactions”
  1. Stefan BellerJan 22, 2015
  2. 1/5 update-ref: test handling large transactions properlyStefan Beller, Jan 22, 2015
  3. Michael HaggertyJan 22, 2015
  4. Jeff KingJan 22, 2015
  5. 2/5 t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZEStefan Beller, Jan 22, 2015
  6. 3/5 refs.c: remove lock_fd from struct ref_lockStefan Beller, Jan 22, 2015
  7. 4/5 refs.c: have a write_sha1_to_lock_file wrapperStefan Beller, Jan 22, 2015
  8. 5/5 refs.c: enable large transactionsStefan Beller, Jan 22, 2015
  9. Michael HaggertyJan 22, 2015
  10. Jeff KingJan 22, 2015
  11. Michael HaggertyJan 22, 2015
  12. Stefan BellerJan 22, 2015
  13. 0/5 So you dislike the sequence of system calls?Stefan Beller, Jan 22, 2015
  14. 1/5 fixup for "refs.c: enable large transactions"Stefan Beller, Jan 22, 2015
  15. 2/5 refs.c: remove unlock_ref from write_ref_sha1Stefan Beller, Jan 22, 2015
  16. 3/5 refs.c: move static functions to close and commit refsStefan Beller, Jan 22, 2015
  17. 4/5 refs.c: remove committing the ref from write_ref_sha1Stefan Beller, Jan 22, 2015
  18. 5/5 refs.c: write values to lock files early for committingStefan Beller, Jan 22, 2015
  19. Ramsay JonesJan 22, 2015
  20. Stefan BellerJan 22, 2015
  21. Ramsay JonesJan 22, 2015
  22. Ramsay JonesJan 22, 2015
  23. Stefan BellerJan 22, 2015
  24. Ramsay JonesJan 22, 2015
  25. Michael HaggertyJan 22, 2015
  26. 0/6 Fix bug in large transactionsStefan Beller, Jan 23, 2015
  27. 1/6 update-ref: test handling large transactions properlyStefan Beller, Jan 23, 2015
  28. 2/6 t7004: rename ULIMIT test prerequisite to ULIMIT_STACK_SIZEStefan Beller, Jan 23, 2015
  29. 3/6 refs.c: remove lock_fd from struct ref_lockStefan Beller, Jan 23, 2015
  30. 4/6 refs.c: move static functions to close and commit refsStefan Beller, Jan 23, 2015
  31. 5/6 refs.c: remove unlock_ref and commit_ref from write_ref_sha1Stefan Beller, Jan 23, 2015
  32. Junio C HamanoJan 23, 2015
  33. Stefan BellerJan 24, 2015
  34. Junio C HamanoJan 24, 2015
  35. Stefan BellerJan 24, 2015
  36. Junio C HamanoJan 24, 2015
  37. 6/6 refs.c: enable large transactionsStefan Beller, Jan 23, 2015
  38. Junio C HamanoJan 24, 2015
  39. Stefan BellerJan 24, 2015
  40. Junio C HamanoJan 24, 2015
  41. Stefan BellerJan 26, 2015
  42. refs.c: clean up write_ref_sha1 returnsStefan Beller, Jan 26, 2015
  43. Junio C HamanoJan 27, 2015
  44. Stefan BellerJan 28, 2015
  45. Junio C HamanoJan 27, 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.