An empty clone whose first commit has invalid paths can be resolved when the origin's branch has another name #187

Open
opened 2026-11-11 05:58:40 +00:00 by james.maes · 0 comments
Owner

From the release reviews of 1.1.1 (2026-11-10). Not part of 1.1.1; planned for 1.2.0 unless said otherwise.

What happens

A clone of a repository that was empty, whose HEAD names a branch the origin does not have (the origin's default branch has another name). The origin's first commit has a path Windows cannot create. The pull reports the paths and offers to resolve them; the apply then fails with "This repository has no commits, and neither has its branch on origin".

The pull follows the origin's default branch for such a clone; the path recovery looks only at the branch HEAD names.

Expected

The recovery finds its target the way the pull does.

Reproduced by a reviewer against fixture repositories.

Re-verify against current main before working on it. A fix needs a regression test that fails without it.

From the release reviews of 1.1.1 (2026-11-10). Not part of 1.1.1; planned for 1.2.0 unless said otherwise. ## What happens A clone of a repository that was empty, whose HEAD names a branch the origin does not have (the origin's default branch has another name). The origin's first commit has a path Windows cannot create. The pull reports the paths and offers to resolve them; the apply then fails with "This repository has no commits, and neither has its branch on origin". The pull follows the origin's default branch for such a clone; the path recovery looks only at the branch HEAD names. ## Expected The recovery finds its target the way the pull does. Reproduced by a reviewer against fixture repositories. Re-verify against current `main` before working on it. A fix needs a regression test that fails without it.
james.maes added the bugdeferred labels 2026-11-11 05:58:40 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/gclo#187