From: Patrick Steinhardt Date: Mon, 31 Aug 2026 08:14:28 GMT Subject: Re: [PATCH 8/8] odb/source: remove the ability to write alternates Message-ID: In-Reply-To: <871pbiuwhw.fsf@emacs.iotcl.com> On Fri, Aug 28, 2026 at 04:53:47PM +0200, Toon Claes wrote: > Patrick Steinhardt writes: > > diff --git a/odb/source-files.c b/odb/source-files.c > > index 5e77b21d9f..feef9e169a 100644 > > --- a/odb/source-files.c > > +++ b/odb/source-files.c > > @@ -303,59 +302,6 @@ static int odb_source_files_read_alternates(struct odb_source *source, > > return 0; > > } > > > > -static int odb_source_files_write_alternate(struct odb_source *source, > > - const char *alternate) > > -{ > > - struct lock_file lock = LOCK_INIT; > > - char *path = xstrfmt("%s/%s", source->path, "info/alternates"); > > - FILE *in, *out; > > - int found = 0; > > - int ret; > > - > > - repo_hold_lock_file_for_update(source->odb->repo, &lock, path, > > - LOCK_DIE_ON_ERROR); > > Why is the new implementation not using a lockfile? Junio asked the same, and the only reason is that I simply didn't think about using a lockfile at all. Will fix, thanks. Patrick