{"thread":{"id":"66700","subject":"[PATCH] notes: do not drop notes written by a concurrent process","startedAt":"2026-10-29T03:55:50Z","lastAt":"2026-10-31T16:46:18Z","messageCount":11,"participants":["Farid Zakaria","Kristoffer Haugsbakk","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"556725","messageId":"20261028-fz-notes-concurrent-write-v1-1-3d513e1fdbb7@gmail.com","threadId":"66700","inReplyTo":null,"subject":"[PATCH] notes: do not drop notes written by a concurrent process","fromName":"Farid Zakaria","fromEmail":"farid.m.zakaria@gmail.com","sentAt":"2026-10-29T03:55:50Z","receivedAt":"2026-10-29T03:55:50Z","isPatch":true,"sender":{"key":"farid.m.zakaria@gmail.com","avatar":"https://gravatar.com/avatar/13645be9e435a4ee3dd61831ce55d857aec3b1f26b0ec6bc700d170a9900d21c?d=mp&s=160"},"body":"\"git notes add\" and the other commands that modify notes read the\nnotes ref, update the notes tree in memory, and then commit it on top\nof whatever the ref points to by then. If another process updated the\nref in the meantime, its notes are silently lost.\n\nThe fix is to remember the commit the notes were read from, and use\nit as both the parent of the new notes commit and the expected old\nvalue of the ref update. A concurrent update now makes the command\nfail with \"cannot lock ref\" instead.\n\nSigned-off-by: Farid Zakaria <farid.m.zakaria@gmail.com>\n---\nI found this with Rewind, a deterministic VM I am building that replays\na program under many thread schedules until one fails. Two \"git notes\nadd\" commands run at once on different commits lost one of the two\nnotes in 15 of 32 schedules, while both exited 0. It is not specific to\nRewind: on a plain Linux machine 25 of 30 runs lost a note. How Rewind\nnarrowed it down to commit_notes() is written up at:\n\n  https://fzakaria.com/2026/10/28/reading-the-code-is-the-hard-part\n\nWith this patch no notes are lost; when two commands race, one of them\nfails with \"cannot lock ref\" and can be retried.\n---\n notes-utils.c    | 15 +++++++++++++--\n notes.c          |  8 ++++++--\n notes.h          |  3 ++-\n t/t3301-notes.sh | 18 ++++++++++++++++++\n 4 files changed, 39 insertions(+), 5 deletions(-)\n\ndiff --git a/notes-utils.c b/notes-utils.c\nindex 5c1c75d5b8..0ce430304f 100644\n--- a/notes-utils.c\n+++ b/notes-utils.c\n@@ -46,6 +46,7 @@ void create_notes_commit(struct repository *r,\n void commit_notes(struct repository *r, struct notes_tree *t, const char *msg)\n {\n \tstruct strbuf buf = STRBUF_INIT;\n+\tstruct commit_list *parents = NULL;\n \tstruct object_id commit_oid;\n \n \tif (!t)\n@@ -59,12 +60,22 @@ void commit_notes(struct repository *r, struct notes_tree *t, const char *msg)\n \tstrbuf_addstr(&buf, msg);\n \tstrbuf_complete_line(&buf);\n \n-\tcreate_notes_commit(r, t, NULL, buf.buf, buf.len, &commit_oid);\n+\t/* Build on the commit the notes were loaded from */\n+\tif (!is_null_oid(&t->base_oid)) {\n+\t\tstruct commit *parent = lookup_commit(r, &t->base_oid);\n+\t\tif (repo_parse_commit(r, parent))\n+\t\t\tdie(\"Failed to find/parse commit %s\", t->ref);\n+\t\tcommit_list_insert(parent, &parents);\n+\t}\n+\n+\tcreate_notes_commit(r, t, parents, buf.buf, buf.len, &commit_oid);\n \tstrbuf_insertstr(&buf, 0, \"notes: \");\n \trefs_update_ref(get_main_ref_store(the_repository), buf.buf,\n-\t\t\tt->update_ref, &commit_oid, NULL, 0,\n+\t\t\tt->update_ref, &commit_oid, &t->base_oid, 0,\n \t\t\tUPDATE_REFS_DIE_ON_ERR);\n+\toidcpy(&t->base_oid, &commit_oid);\n \n+\tcommit_list_free(parents);\n \tstrbuf_release(&buf);\n }\n \ndiff --git a/notes.c b/notes.c\nindex ec9c2cb150..d71b528f37 100644\n--- a/notes.c\n+++ b/notes.c\n@@ -1039,12 +1039,16 @@ void init_notes(struct notes_tree *t, const char *notes_ref,\n \tt->combine_notes = combine_notes;\n \tt->initialized = 1;\n \tt->dirty = 0;\n+\toidclr(&t->base_oid, the_repository->hash_algo);\n \n \tif (flags & NOTES_INIT_EMPTY ||\n \t    repo_get_oid_treeish(the_repository, notes_ref, &object_oid))\n \t\tgoto out;\n-\tif (flags & NOTES_INIT_WRITABLE && refs_read_ref(get_main_ref_store(the_repository), notes_ref, &object_oid))\n-\t\tdie(\"Cannot use notes ref %s\", notes_ref);\n+\tif (flags & NOTES_INIT_WRITABLE) {\n+\t\tif (refs_read_ref(get_main_ref_store(the_repository), notes_ref, &object_oid))\n+\t\t\tdie(\"Cannot use notes ref %s\", notes_ref);\n+\t\toidcpy(&t->base_oid, &object_oid);\n+\t}\n \tif (get_tree_entry(the_repository, &object_oid, \"\", &oid, &mode))\n \t\tdie(\"Failed to read notes tree referenced by %s (%s)\",\n \t\t    notes_ref, oid_to_hex(&object_oid));\ndiff --git a/notes.h b/notes.h\nindex 6dc6d7b265..30f4ece5e9 100644\n--- a/notes.h\n+++ b/notes.h\n@@ -1,9 +1,9 @@\n #ifndef NOTES_H\n #define NOTES_H\n \n+#include \"hash.h\"\n #include \"string-list.h\"\n \n-struct object_id;\n struct repository;\n struct strbuf;\n \n@@ -54,6 +54,7 @@ extern struct notes_tree {\n \tstruct non_note *first_non_note, *prev_non_note;\n \tchar *ref;\n \tchar *update_ref;\n+\tstruct object_id base_oid;\n \tcombine_notes_fn combine_notes;\n \tint initialized;\n \tint dirty;\ndiff --git a/t/t3301-notes.sh b/t/t3301-notes.sh\nindex 18a6000171..561f9ccc18 100755\n--- a/t/t3301-notes.sh\n+++ b/t/t3301-notes.sh\n@@ -1629,4 +1629,22 @@ test_expect_success 'git notes append aborts when editor fails with -e' '\n \ttest_must_fail git notes show\n '\n \n+test_expect_success 'git notes add does not drop notes added while it runs' '\n+\ttest_commit 23rd &&\n+\ttest_commit 24th &&\n+\n+\t# The editor adds a note to another commit while the outer\n+\t# \"git notes add\" is waiting for it, as a concurrent process would.\n+\twrite_script racing_editor <<-\\EOF &&\n+\tgit notes add -m \"added meanwhile\" 23rd &&\n+\techo \"edited\" >\"$1\"\n+\tEOF\n+\ttest_must_fail env GIT_EDITOR=./racing_editor git notes add 24th &&\n+\n+\techo \"added meanwhile\" >expect &&\n+\tgit notes show 23rd >actual &&\n+\ttest_cmp expect actual &&\n+\ttest_must_fail git notes show 24th\n+'\n+\n test_done\n\n---\nbase-commit: 8d1b215c01512b9658d4525c54ff9b9245f9a7e8\nchange-id: 20261028-fz-notes-concurrent-write-4ee590954ece\n\n\n"},{"id":"556762","messageId":"3c4f3793-07d4-47c7-b503-13a6ae567147@app.fastmail.com","threadId":"66700","inReplyTo":"20261028-fz-notes-concurrent-write-v1-1-3d513e1fdbb7@gmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-29T11:05:12Z","receivedAt":"2026-10-29T11:05:12Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Thu, Oct 29, 2026, at 04:55, Farid Zakaria wrote:\n> \"git notes add\" and the other commands that modify notes read the\n> notes ref, update the notes tree in memory, and then commit it on top\n> of whatever the ref points to by then. If another process updated the\n> ref in the meantime, its notes are silently lost.\n\nThis looks like a really nice find.\n\n>\n> The fix is to remember the commit the notes were read from, and use\n> it as both the parent of the new notes commit and the expected old\n> value of the ref update. A concurrent update now makes the command\n> fail with \"cannot lock ref\" instead.\n\nThis makes sense and is how I would have assumed `git notes add` and\nsimilar to work. Because you have:\n\n    git update-ref <ref> <new-oid> [<old-oid>\n\nExactly so that you can try to update a ref with the assumption that\nnothing else intervenes, because it will fail if <old-oid> does not\nbecome the previous OID.\n\nSo I thought that the code that git-notes(1) uses would work\nthe same way.\n\n>\n> Signed-off-by: Farid Zakaria <farid.m.zakaria@gmail.com>\n> ---\n>[snip]\n\nSo if this change is:\n\n• Before it silently dropped the change\n• Now it loudly fails\n\nThen that is a pure improvement.\n\nHowever, thinking beyond this patch. Let’s say one program wants to\nadd a note on `master`. But another one wants to add a note on\n`feature1`. One will fail. But should that happen in a perfect world?\nLet’s say that `master` wins. `feature1` is not trying to “clobber”\nanything relative to the `master` program; it wants to add a note to a\ndifferent commit. And does the `feature1` program care if the commit\ncorresponding to the note is a child of the commit when it first started\nthe process? I don’t think so. It does matter for two programs that want\nto update a branch, but here the commit structure is a kind of\nimplementation detail, how Notes are implemented so that you get\nsnapshot of the notes as well as the whole edit history. As an example:\n\n    commit A, commit B, commit C, commit D...\n\nIt could just be shuffled.\n\nInstead, maybe this would happen in an ideal world:\n\n1. `master` and `feature1` race to commit a note\n2. `master` wins\n3. `feature1` notices that there is a new note commit (from `master`)\n4. It checks whether that commit changed the commit that *it*\n   (`feature1`) wanted to update\n   • If so: fail\n   • If not: continue\n5. `feature1` retries (go to (1))\n\nMaybe this is too much logic for a “porcelain” command (interactive\nuse), but there is no plumbing Notes command.\n\n"},{"id":"556811","messageId":"xmqqbj8c2wk8.fsf@gitster.g","threadId":"66700","inReplyTo":"3c4f3793-07d4-47c7-b503-13a6ae567147@app.fastmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-29T18:25:43Z","receivedAt":"2026-10-29T18:25:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n\n> Instead, maybe this would happen in an ideal world:\n>\n> 1. `master` and `feature1` race to commit a note\n> 2. `master` wins\n> 3. `feature1` notices that there is a new note commit (from `master`)\n> 4. It checks whether that commit changed the commit that *it*\n>    (`feature1`) wanted to update\n>    • If so: fail\n>    • If not: continue\n> 5. `feature1` retries (go to (1))\n>\n> Maybe this is too much logic for a “porcelain” command (interactive\n> use), but there is no plumbing Notes command.\n\nOr possibly\n\n 1. two races. Both remembers what commit was at the tip of the\n    notes tree (call it commit #1).\n\n 2. each creates a new note commit on top of #1.  Call them commit\n    #2master and #2feature1.\n\n 3. 'master' one wins the race.  As #2master is a fast-forward from\n    #1, the notes tree gets #2master at its tip.\n\n 4. 'feature1' loses the race.  It merges #2feature1 into, or\n    rebases #2feature1 on top of, #2master and updates the notes\n    tree.\n\n;-)\n\n\n\n"},{"id":"556830","messageId":"DMHMEOZ1ZXRI.TDMEKTJ9W325@gmail.com","threadId":"66700","inReplyTo":"xmqqbj8c2wk8.fsf@gitster.g","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Farid Zakaria","fromEmail":"farid.m.zakaria@gmail.com","sentAt":"2026-10-29T20:56:10Z","receivedAt":"2026-10-29T20:56:10Z","isPatch":true,"sender":{"key":"farid.m.zakaria@gmail.com","avatar":"https://gravatar.com/avatar/13645be9e435a4ee3dd61831ce55d857aec3b1f26b0ec6bc700d170a9900d21c?d=mp&s=160"},"body":"On Thu Oct 29, 2026 at 11:25 AM PDT, Junio C Hamano wrote:\n> \"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n>\n>> Instead, maybe this would happen in an ideal world:\n>>\n>> 1. `master` and `feature1` race to commit a note\n>> 2. `master` wins\n>> 3. `feature1` notices that there is a new note commit (from `master`)\n>> 4. It checks whether that commit changed the commit that *it*\n>>    (`feature1`) wanted to update\n>>    • If so: fail\n>>    • If not: continue\n>> 5. `feature1` retries (go to (1))\n>>\n>> Maybe this is too much logic for a “porcelain” command (interactive\n>> use), but there is no plumbing Notes command.\n>\n> Or possibly\n>\n>  1. two races. Both remembers what commit was at the tip of the\n>     notes tree (call it commit #1).\n>\n>  2. each creates a new note commit on top of #1.  Call them commit\n>     #2master and #2feature1.\n>\n>  3. 'master' one wins the race.  As #2master is a fast-forward from\n>     #1, the notes tree gets #2master at its tip.\n>\n>  4. 'feature1' loses the race.  It merges #2feature1 into, or\n>     rebases #2feature1 on top of, #2master and updates the notes\n>     tree.\n>\n> ;-)\n\nYour proposals for retries when possible make sense but I may leave that\nto you to implement.\n\nI felt confident reviewing the current patch at it's current state\n(AI-assisted) and I do concur that it's a net-positive change in the\ninterim.\n\n(I guess I could try to implement the retry logic - AI\nassisted if you like)\n\nWould it be OK if I also suggested the other two bugs (+small fixes)\nI found on the mailing list (with the same tool)?\n\nThey are:\n* Similar race-type bug for credential-cache leaving a stale daemon+credential\n* fsmonitor daemon keeps running after its worktree is deleted or moved\n\nBoth patches are of similar size and complexity to this one, with a test\ncase.\n\n"},{"id":"556835","messageId":"xmqqzevwyyi1.fsf@gitster.g","threadId":"66700","inReplyTo":"DMHMEOZ1ZXRI.TDMEKTJ9W325@gmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-29T21:42:46Z","receivedAt":"2026-10-29T21:42:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Farid Zakaria\" <farid.m.zakaria@gmail.com> writes:\n\n> I felt confident reviewing the current patch at it's current state\n> (AI-assisted) and I do concur that it's a net-positive change in the\n> interim.\n\nSorry, but I find the above very confusing, and I cannot figure out\nwho is reviewing whose patch, and who is concuring whose statement\nthat said what.\n\n\n\n"},{"id":"556838","messageId":"DMHO3TPL4QDJ.2G50G0W2R3ZGB@gmail.com","threadId":"66700","inReplyTo":"xmqqzevwyyi1.fsf@gitster.g","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Farid Zakaria","fromEmail":"farid.m.zakaria@gmail.com","sentAt":"2026-10-29T22:16:01Z","receivedAt":"2026-10-29T22:16:01Z","isPatch":true,"sender":{"key":"farid.m.zakaria@gmail.com","avatar":"https://gravatar.com/avatar/13645be9e435a4ee3dd61831ce55d857aec3b1f26b0ec6bc700d170a9900d21c?d=mp&s=160"},"body":"On Thu Oct 29, 2026 at 2:42 PM PDT, Junio C Hamano wrote:\n> \"Farid Zakaria\" <farid.m.zakaria@gmail.com> writes:\n>\n>> I felt confident reviewing the current patch at it's current state\n>> (AI-assisted) and I do concur that it's a net-positive change in the\n>> interim.\n>\n> Sorry, but I find the above very confusing, and I cannot figure out\n> who is reviewing whose patch, and who is concuring whose statement\n> that said what.\n\nIt's because I bottom-posted; I thought it might be easier to read that\nway -- I guess not.\n\nI was just trying to say that I felt confident in my comprehension of\nthis current patch, and agreed with Kristoffer that it's a positive\nchange as it stands, although the algorithm could be improved to handle\ncases with different branches as mentioned.\n\n(hopefully that's a little more concise and clear)\n\n"},{"id":"556864","messageId":"34b5c9c8-74d6-4d49-93cf-1d1909d56e9b@app.fastmail.com","threadId":"66700","inReplyTo":"DMHMEOZ1ZXRI.TDMEKTJ9W325@gmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-30T09:21:39Z","receivedAt":"2026-10-30T09:21:39Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Thu, Oct 29, 2026, at 21:56, Farid Zakaria wrote:\n> On Thu Oct 29, 2026 at 11:25 AM PDT, Junio C Hamano wrote:\n>> \"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n>>>[snip]\n>>\n>> Or possibly\n>>\n>>[snip]\n>\n> Your proposals for retries when possible make sense but I may leave that\n> to you to implement.\n>\n> I felt confident reviewing the current patch at it's current state\n> (AI-assisted) and I do concur that it's a net-positive change in the\n> interim.\n\nUse of GenAI should be disclosed up front.\nDocumentation/SubmittingPatches, [[ai]].\n\n>\n> (I guess I could try to implement the retry logic - AI\n> assisted if you like)\n>\n> Would it be OK if I also suggested the other two bugs (+small fixes)\n> I found on the mailing list (with the same tool)?\n>\n> They are:\n> * Similar race-type bug for credential-cache leaving a stale daemon+credential\n> * fsmonitor daemon keeps running after its worktree is deleted or moved\n>\n> Both patches are of similar size and complexity to this one, with a test\n> case.\n\n"},{"id":"556868","messageId":"auRmJRKUU-C4mVm6@pks.im","threadId":"66700","inReplyTo":"DMHO3TPL4QDJ.2G50G0W2R3ZGB@gmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-10-30T09:40:53Z","receivedAt":"2026-10-30T09:40:53Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Oct 29, 2026 at 03:16:01PM -0700, Farid Zakaria wrote:\n> On Thu Oct 29, 2026 at 2:42 PM PDT, Junio C Hamano wrote:\n> > \"Farid Zakaria\" <farid.m.zakaria@gmail.com> writes:\n> >\n> >> I felt confident reviewing the current patch at it's current state\n> >> (AI-assisted) and I do concur that it's a net-positive change in the\n> >> interim.\n> >\n> > Sorry, but I find the above very confusing, and I cannot figure out\n> > who is reviewing whose patch, and who is concuring whose statement\n> > that said what.\n> \n> It's because I bottom-posted; I thought it might be easier to read that\n> way -- I guess not.\n> \n> I was just trying to say that I felt confident in my comprehension of\n> this current patch, and agreed with Kristoffer that it's a positive\n> change as it stands, although the algorithm could be improved to handle\n> cases with different branches as mentioned.\n> \n> (hopefully that's a little more concise and clear)\n\nAre we talking to a meat proxy here?\n\nPatrick\n\n"},{"id":"556893","messageId":"08f52196-766d-45fb-a250-08a9ab4aef2a@app.fastmail.com","threadId":"66700","inReplyTo":"xmqqbj8c2wk8.fsf@gitster.g","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-30T10:46:14Z","receivedAt":"2026-10-30T10:46:14Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Thu, Oct 29, 2026, at 19:25, Junio C Hamano wrote:\n> \"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n>\n>> Instead, maybe this would happen in an ideal world:\n>>\n>> 1. `master` and `feature1` race to commit a note\n>> 2. `master` wins\n>> 3. `feature1` notices that there is a new note commit (from `master`)\n>> 4. It checks whether that commit changed the commit that *it*\n>>    (`feature1`) wanted to update\n>>    • If so: fail\n>>    • If not: continue\n>> 5. `feature1` retries (go to (1))\n>>\n>> Maybe this is too much logic for a “porcelain” command (interactive\n>> use), but there is no plumbing Notes command.\n>\n> Or possibly\n>\n>  1. two races. Both remembers what commit was at the tip of the\n>     notes tree (call it commit #1).\n>\n>  2. each creates a new note commit on top of #1.  Call them commit\n>     #2master and #2feature1.\n>\n>  3. 'master' one wins the race.  As #2master is a fast-forward from\n>     #1, the notes tree gets #2master at its tip.\n>\n>  4. 'feature1' loses the race.  It merges #2feature1 into, or\n>     rebases #2feature1 on top of, #2master and updates the notes\n>     tree.\n>\n> ;-)\n\nThat would be the most elegant. But I think doing a three-way merge\nwould go too far. Say you have another case where two processes try to\nupdate the note for the same commit C, but the first process edits the\nstart and the second one edits the end. These are far enough apart that\nthey merge successfully. But I think that such a race concluding with a\nnote merge would be wrong in general.\n\n"},{"id":"556957","messageId":"DMIFRWWLOTMP.3HVH81PKHBTKK@gmail.com","threadId":"66700","inReplyTo":"34b5c9c8-74d6-4d49-93cf-1d1909d56e9b@app.fastmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Farid Zakaria","fromEmail":"farid.m.zakaria@gmail.com","sentAt":"2026-10-30T19:56:58Z","receivedAt":"2026-10-30T19:56:58Z","isPatch":true,"sender":{"key":"farid.m.zakaria@gmail.com","avatar":"https://gravatar.com/avatar/13645be9e435a4ee3dd61831ce55d857aec3b1f26b0ec6bc700d170a9900d21c?d=mp&s=160"},"body":"On Fri Oct 30, 2026 at 2:21 AM PDT, Kristoffer Haugsbakk wrote:\n> On Thu, Oct 29, 2026, at 21:56, Farid Zakaria wrote:\n>> On Thu Oct 29, 2026 at 11:25 AM PDT, Junio C Hamano wrote:\n>>> \"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> writes:\n>>>>[snip]\n>>>\n>>> Or possibly\n>>>\n>>>[snip]\n>>\n>> Your proposals for retries when possible make sense but I may leave that\n>> to you to implement.\n>>\n>> I felt confident reviewing the current patch at it's current state\n>> (AI-assisted) and I do concur that it's a net-positive change in the\n>> interim.\n>\n> Use of GenAI should be disclosed up front.\n> Documentation/SubmittingPatches, [[ai]].\n>\n\nPlease consider the thread my disclosure.\n\nFWIW I did read https://git-scm.com/docs/SubmittingPatches as of today\nand I don't see any specific mention of disclosure. It might be a good\nidea to make that explicit.\n\nI see no mention of special trailer or mention to disclosure although it\ndoes mention rejecting anything that looks like \"slop\" which I hope this\nis not -- I went through the patch and the failure.\n\nIf I was looking at the wrong document, please point me to the right\none.\n>>\n>> (I guess I could try to implement the retry logic - AI\n>> assisted if you like)\n>>\n>> Would it be OK if I also suggested the other two bugs (+small fixes)\n>> I found on the mailing list (with the same tool)?\n>>\n>> They are:\n>> * Similar race-type bug for credential-cache leaving a stale daemon+credential\n>> * fsmonitor daemon keeps running after its worktree is deleted or moved\n>>\n>> Both patches are of similar size and complexity to this one, with a test\n>> case.\n\n\n\n"},{"id":"557032","messageId":"e40472c7-cb23-4ac9-b82e-1326fd8c88d7@app.fastmail.com","threadId":"66700","inReplyTo":"DMIFRWWLOTMP.3HVH81PKHBTKK@gmail.com","subject":"Re: [PATCH] notes: do not drop notes written by a concurrent process","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-31T16:46:18Z","receivedAt":"2026-10-31T16:46:18Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Fri, Oct 30, 2026, at 20:56, Farid Zakaria wrote:\n> On Fri Oct 30, 2026 at 2:21 AM PDT, Kristoffer Haugsbakk wrote:\n>> On Thu, Oct 29, 2026, at 21:56, Farid Zakaria wrote:\n>>>>>[snip]\n>>\n>> Use of GenAI should be disclosed up front.\n>> Documentation/SubmittingPatches, [[ai]].\n>>\n>\n> Please consider the thread my disclosure.\n>\n> FWIW I did read https://git-scm.com/docs/SubmittingPatches as of today\n> and I don't see any specific mention of disclosure. It might be a good\n> idea to make that explicit.\n\nI guess I, uh, had a false memory.\n\n>\n> I see no mention of special trailer or mention to disclosure although it\n> does mention rejecting anything that looks like \"slop\" which I hope this\n> is not -- I went through the patch and the failure.\n>\n> If I was looking at the wrong document, please point me to the right\n> one.\n>>>[snip]\n\n"}]}