Skip to content

fetchgit subtests and fetching with leaveDotGit = true fails if Git has withBreakingChanges = true #571319

Open

Description

@me-and

Git v3 breaking changes tracking issue: #567918

Git v3 (and Git v2 when compiled with breaking changes enabled) makes several changes to the layout of the .git directory created in Git worktrees. One of those changes means some of our fetchgit tests fail, including fetchgit.fetchTags.

Before we can use Git v3 for fetchgit, we'll need to rewrite fetchgit to cope with this new repository structure.

Building on commit 847c87d on x86_64-linux, with the following command:

nix-build -A tests.fetchgit.fetchTags --arg overlays '[ (final: prev: { git = prev.git.override { withBreakingChanges = true; }; }) ]'

it appears the clone completes successfully, but then fails with the error fatal: failed to resolve HEAD as a valid ref.

Edit: The same failure mode affects any builds that use leaveDotGit = true. This includes, for example, python3Packages.uv-dynamic-versioning.

Activity

  1. me-and commented on Oct 7, 2026

    @me-and
    MemberAuthor

    The same symptoms – and therefore presumably the same failure mode – also appears with:

    • tests.fetchgit.leave-git
    • tests.fetchgit.submodule-deep
    • tests.fetchgit.submodule-leave-git
    • tests.fetchgit.submodule-leave-git-deep
  2. changed the title [-]`tests.fetchgit.fetchTags` fails if Git has `withBreakingChanges = true`[/-] [+]fetchgit subtests and fetching with `leaveDotGit = true` fails if Git has `withBreakingChanges = true`[/+] on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.topic: fetchFetchers (e.g. fetchgit, fetchsvn, ...)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions