mnauw / git-remote-hg

Transparent bidirectional bridge between Git and Mercurial for Git
GNU General Public License v2.0
62 stars 5 forks source link

v0.4 tag conflicts between felipec & mnauw repositories #45

Closed pabs3 closed 3 years ago

pabs3 commented 3 years ago

I noticed that the v0.4 tag conflicts between the felipec and mnauw repositories. I'm not sure which of the two repos has the correct tag, but I think felipec's one is correct because the v0.4 tag from it is close to the v0.3 tag, but the v0.4 tag from your repository is closer to the v1.0.1 tag.

If you agree with my assessment, here is how to fix the issue:

git push --delete origin v0.4
git tag --delete v0.4
git remote add felipec https://github.com/felipec/git-remote-hg.git
git fetch --tags felipec v0.4
git push --tags
git remote remove felipec

Here is the verification for the issue:

$ git clone -o felipec -q https://github.com/felipec/git-remote-hg.git

$ cd git-remote-hg/

git-remote-hg (master=) $ git remote add mnauw https://github.com/mnauw/git-remote-hg.git

git-remote-hg (master=) $ git fetch --tags mnauw 
remote: Enumerating objects: 457, done.
remote: Counting objects: 100% (234/234), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 457 (delta 190), reused 229 (delta 188), pack-reused 223
Receiving objects: 100% (457/457), 214.71 KiB | 648.00 KiB/s, done.
Resolving deltas: 100% (312/312), completed with 22 local objects.
From https://github.com/mnauw/git-remote-hg
 * [new branch]      master      -> mnauw/master
 * [new branch]      test        -> mnauw/test
 * [new branch]      topic_notes -> mnauw/topic_notes
 ! [rejected]        v0.4        -> v0.4  (would clobber existing tag)
 * [new tag]         v1.0.0      -> v1.0.0
 * [new tag]         v1.0.1      -> v1.0.1
 * [new tag]         v1.0.2      -> v1.0.2
 * [new tag]         v1.0.2.1    -> v1.0.2.1

git-remote-hg (master=) $ git fetch --tags mnauw 
From https://github.com/mnauw/git-remote-hg
 ! [rejected]        v0.4       -> v0.4  (would clobber existing tag)

git-remote-hg (master=) $ grep -F v0.4 .git/packed-refs
cc4e5659d941845d7b80798f7261aebcbf64b4c0 refs/tags/v0.4

git-remote-hg (master=) $ git log --oneline cc4e5659d941845d7b80798f7261aebcbf64b4c0 | head -n1
cc4e565 Merge branch 'check-versions'

git-remote-hg (master=) $ git tag -d v0.4 
Deleted tag 'v0.4' (was cc4e565)

git-remote-hg (master=) $ git fetch --tags mnauw 
From https://github.com/mnauw/git-remote-hg
 * [new tag]         v0.4       -> v0.4

git-remote-hg (master=) $ cat .git/refs/tags/v0.4 
5e96683f67af35475175bb057271102edb4a3c9a

$ git log --oneline 5e96683f67af35475175bb057271102edb4a3c9a | head -n1
5e96683 Adjust to Mercurial 4.6 wrt revision numbers
mnauw commented 3 years ago

felipec v0.4 tag is indeed closer to v0.3 (because there a lot less commits in that repo), but it was tagged (in June 2019) when v0.4 already existed in this repo (tagged May 2018). So, I would argue, this repo got there/it first ;-). felipec might decide to add any other tag anytime, and then there may well be another tag conflict. As such, going down the path of removing tags in this repo does not feel like the right one (nor future proof in any way).

pabs3 commented 3 years ago

I see, thanks for the info, that was unexpected.

It is unfortunate that there wasn't better collaboration on git-remote-*.

-- bye, pabs

https://bonedaddy.net/pabs3/