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

Re: [PATCH] notes: do not drop notes written by a concurrent process

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 29, 2026, 18:25 UTC
Message-ID
<xmqqbj8c2wk8.fsf@gitster.g>
In-Reply-To
<3c4f3793-07d4-47c7-b503-13a6ae567147@app.fastmail.com>
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 13 quoted lines
> Instead, maybe this would happen in an ideal world:
>
> 1. `master` and `feature1` race to commit a note
> 2. `master` wins
> 3. `feature1` notices that there is a new note commit (from `master`)
> 4. It checks whether that commit changed the commit that *it*
>    (`feature1`) wanted to update
>    • If so: fail
>    • If not: continue
> 5. `feature1` retries (go to (1))
>
> Maybe this is too much logic for a “porcelain” command (interactive
> use), but there is no plumbing Notes command.
Or possibly
 1. two races. Both remembers what commit was at the tip of the
    notes tree (call it commit #1).
 2. each creates a new note commit on top of #1.  Call them commit
    #2master and #2feature1.
 3. 'master' one wins the race.  As #2master is a fast-forward from
    #1, the notes tree gets #2master at its tip.
 4. 'feature1' loses the race.  It merges #2feature1 into, or
    rebases #2feature1 on top of, #2master and updates the notes
    tree.
;-)
Previous: Kristoffer HaugsbakkNext: Farid Zakaria
Message 3 of 11 in “notes: do not drop notes written by a concurrent process”
  1. notes: do not drop notes written by a concurrent processFarid Zakaria, Oct 29, 2026
  2. Kristoffer HaugsbakkOct 29, 2026
  3. Junio C HamanoOct 29, 2026
  4. Farid ZakariaOct 29, 2026
  5. Junio C HamanoOct 29, 2026
  6. Farid ZakariaOct 29, 2026
  7. Patrick SteinhardtOct 30, 2026
  8. Kristoffer HaugsbakkOct 30, 2026
  9. Farid ZakariaOct 30, 2026
  10. Kristoffer HaugsbakkOct 31, 2026
  11. Kristoffer HaugsbakkOct 30, 2026

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.