git fast-export/import bug with -M -C
- From
Juraj Oršulić <juraj.orsulic@fer.hr>
- Date
- Sep 14, 2017, 22:01 UTC
- Message-ID
- <CAEPqvoyVJFe2EOvhnZD4vdF=1-VuoZrMP92TeGJ2WAE0X+B5Tw@mail.gmail.com>
The commands should be self explanatory. 0.2.0~20 is the first commit where the reconstructed repository diverges, that commit had a simultaneous copy and edit of one file. It seems that copy/rename detection, enabled with -M -C is confused by this. I reproduced it with git 2.14 next @ 8fa685d.
git clone https://github.com/googlecartographer/cartographer_ros mkdir copy && cd copy && git init (cd ../cartographer_ros; git fast-export --all --date-order -M -C) | git fast-import git rev-parse 0.2.0~20 #2237e1d0a974977fbcb0737dd1fb5876a2b8e29d git rev-parse 0.2.0~21 #cd1276a99ccffcc491d0b2e50296ec04347ba5f2 cd ../cartographer_ros git rev-parse 0.2.0~20 #9d5b221ed41783b15c84bc90b71527194b8d9a49 git rev-parse 0.2.0~21 #cd1276a99ccffcc491d0b2e50296ec04347ba5f2