mbox series

[0/3] setup: fix reinit of repos with different formats

Message ID 20250130-b4-pks-reinit-default-ref-format-v1-0-d2769ca01207@pks.im (mailing list archive)
Headers show
Series setup: fix reinit of repos with different formats | expand

Message

Patrick Steinhardt Jan. 30, 2025, 4:24 p.m. UTC
Hi,

this issue with the reinitialization of the ref format was recently
discovered in our CI systems at GitLab, where caches contained repos
with one ref format but we tried to reinit them with a different ref
format. But turns out that the same issue also exists for the object
format, so this patch series fixes both issues.

Thanks!

Patrick

---
Patrick Steinhardt (3):
      t0001: remove duplicate test
      setup: fix reinit of repos with incompatible GIT_DEFAULT_REF_FORMAT
      setup: fix reinit of repos with incompatible GIT_DEFAULT_HASH

 setup.c         |  8 ++++++--
 t/t0001-init.sh | 30 +++++++++++++++++++++---------
 2 files changed, 27 insertions(+), 11 deletions(-)


---
base-commit: 3b0d05c4a79d0e441283680a864529b02dca5f08
change-id: 20250130-b4-pks-reinit-default-ref-format-96a5e2104421

Comments

brian m. carlson Jan. 30, 2025, 11:58 p.m. UTC | #1
On 2025-01-30 at 16:24:16, Patrick Steinhardt wrote:
> Hi,
> 
> this issue with the reinitialization of the ref format was recently
> discovered in our CI systems at GitLab, where caches contained repos
> with one ref format but we tried to reinit them with a different ref
> format. But turns out that the same issue also exists for the object
> format, so this patch series fixes both issues.

I looked at this series and it seems reasonable.  As you mentioned,
reinitializing the repository in this way cannot possibly work in any
meaningful sense, so rejecting it is the prudent thing to do.