bug(clone): madt_clone with branch set to a tag reports (branch: master) #684

Closed
opened 2026-09-30 00:22:20 +00:00 by hexajon · 0 comments
Owner

What happens

I cloned a mirror of forgejo/forgejo with madt_clone repository=MIRROR_URL depth=1 branch=v15.0.6. The result line printed (branch: master).

The checkout is the tag, not master. In the clone, git log -1 --decorate printed 5f7e2e5 (grafted, HEAD, tag: v15.0.6).

Why it matters

I read the result line to confirm what I cloned. (branch: master) says that the clone ignored branch=, so I clone again, or I distrust a correct checkout.

Ask

  • When branch= names a tag, print the tag, for example (tag: v15.0.6, detached HEAD).
  • When branch= names a branch, print that branch.
  • Add one test for each case.
## What happens I cloned a mirror of `forgejo/forgejo` with `madt_clone repository=MIRROR_URL depth=1 branch=v15.0.6`. The result line printed `(branch: master)`. The checkout is the tag, not `master`. In the clone, `git log -1 --decorate` printed `5f7e2e5 (grafted, HEAD, tag: v15.0.6)`. ## Why it matters I read the result line to confirm what I cloned. `(branch: master)` says that the clone ignored `branch=`, so I clone again, or I distrust a correct checkout. ## Ask - When `branch=` names a tag, print the tag, for example `(tag: v15.0.6, detached HEAD)`. - When `branch=` names a branch, print that branch. - Add one test for each case.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#684
No description provided.