frej / fast-export

A mercurial to git converter using git-fast-import
http://repo.or.cz/w/fast-export.git
808 stars 255 forks source link

Give proper error message when refusing to overwrite existing branch #270

Closed frej closed 3 years ago

frej commented 3 years ago

If fast-export was asked to export a Mercurial branch to Git and a branch of the same name already existed in the Git repo but it was not created by fast export, fast-export would crash while trying to format an error message claiming that the destination branch was modified behind its back.

This patch extends fast-export to detect the situation above and give a proper error message which hopefully is less confusing to the user.

Credits for discovering the original crash goes to Shun-ichi Goto gotoh@taiyo.co.jp.

Closes: #269.