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

Re: What's cooking in git.git (Mar 2014, #07; Fri, 28)

From
Ronnie Sahlberg <sahlberg@google.com>
Date
Mar 31, 2014, 17:56 UTC
Message-ID
<CAL=YDWnKb7Di3wsw7i1kn0mCGAmqvSY+xQOA5wo2v_EohkHEEg@mail.gmail.com>
In-Reply-To
<53360457.1060008@alum.mit.edu>
(now without HTML formatting)
I am new to git, so sorry If I overlooked something.

I think there might be a race in ref_transaction_commit() when deleting references.

/* Perform deletes now that updates are safely completed */ for (i = 0; i < n; i++) { struct ref_update *update = updates[i];

if (update->lock) { delnames[delnum++] = update->lock->ref_name; ret |= delete_ref_loose(update->lock, update->type); } }

ret |= repack_without_refs(delnames, delnum); for (i = 0; i < delnum; i++) unlink_or_warn(git_path("logs/%s", delnames[i]));

These two blocks should be reordered so that you first delete the actual refs first, while holding the lock and then release the lock afterward ?

On Fri, Mar 28, 2014 at 4:23 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 29 quoted lines
> On 03/28/2014 11:21 PM, Junio C Hamano wrote:
>> Here are the topics that have been cooking.  Commits prefixed with
>> '-' are only in 'pu' (proposed updates) while commits prefixed with
>> '+' are in 'next'.
>
> Junio,
>
> Have you overlooked my ref-transactions series [1], or just not gotten
> to it yet?
>
> If you would like a version of the series that already addresses Brad
> King's comments, you can get it from my GitHub fork [2], the
> "ref-transactions" branch.  I'd be happy to post a v3 to the list if you
> prefer, but the only changes since v2 were to a commit message and a
> comment so it seems like overkill.
>
> Michael
>
> [1] http://thread.gmane.org/gmane.comp.version-control.git/244857
> [2] https://github.com/mhagger/git
>
> --
> Michael Haggerty
> mhagger@alum.mit.edu
> http://softwareswirl.blogspot.com/
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Junio C HamanoNext: Michael Haggerty
Message 4 of 8 in “What's cooking in git.git (Mar 2014, #07; Fri, 28)”
  1. Junio C HamanoMar 28, 2014
  2. Michael HaggertyMar 28, 2014
  3. Junio C HamanoMar 30, 2014
  4. Ronnie SahlbergMar 31, 2014
  5. Michael HaggertyMar 31, 2014
  6. Max HornMar 29, 2014
  7. Duy NguyenMar 30, 2014
  8. Junio C HamanoMar 31, 2014

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.