On 6/28/22 9:25 AM, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee <derrickstolee@xxxxxxxxxx> > +static int write_update_refs_state(struct string_list *refs_to_oids) > +{ > + int result = 0; > + FILE *fp = NULL; > + struct string_list_item *item; > + char *path = xstrdup(rebase_path_update_refs()); > + > + if (safe_create_leading_directories(path)) { > + result = error(_("unable to create leading directories of %s"), > + path); > + goto cleanup; > + } > + > + fp = fopen(path, "w"); I realized (while trying to go to sleep, of course) that I need to use a lockfile here. Parallel processes might be reading this file while we are writing it. Thanks, -Stolee