Skip to content

tags: handle orphaned, annotated tags correctly, and fix pushing them

Git allows two kinds of tags: annotated and plain. Plain tags are simple refs pointing to a commit, and annotated tags point to a Tag object then pointing to the commit. The code previously assumed that all exported tags where plain tags, which would overwrite annotated tags.

We recently fixed this, in cc4f3340afc9, when exporting tags from Mercurial to Git; this applies the same fix during Git discovery.

This includes a test based on the script provided by @jmb in the bug.

Fixes #358 (closed)

Edited by Dan Villiom Podlaski Christiansen

Merge request reports