rtcTo / rtc2gitcli

An IBM's RTC SCM tool extension to migrate an RTC repository into a Git repository
https://rtc.to
MIT License
28 stars 34 forks source link

Unable to migrate subfolder containing .git folder #36

Closed akoptelov closed 6 years ago

akoptelov commented 7 years ago

If a project/directory in RTC contains .git folder, it won't be migrated to git. I occasionally added .git folder when initially shared my project in RTC. Now when I have to migrate it to GIT the migration plug-in leaves the project folder empty. There should be a way to override the current behaviour since otherwise it's impossible to import that project.

reinhapa commented 7 years ago

@akoptelov what do you suggest as a possible way? Try to ignore .git folders that come from RTC somehow? What with contents of such a folder?

akoptelov commented 7 years ago

@reinhapa Adding the .git to .gitignore works for plain git, but doesn't for JGit version that the rtc2gitcli is using. Still there's a bug report and code targeting it is already in the stable JGit since 4.3. As I see it, there can be two scenarios. One is that there is a real GIT repository in RTC, and in this case current behaviour is perfectly OK since that repo should be migrated separately. And the second one is when the repository metadata got to the RTC by mistake and doesn't have any value and thus .git should be ignored completely and all files should be migrated normally. The solution would be to adopt JGit 4.3 (or newer?) and then implement possibility to specify additional git options (core/dirNoGitLinks boolean flag does the trick). I guess we can introduce general way to specify them via properties. If you're ok with this, I can create a pull request for it.

reinhapa commented 7 years ago

@akoptelov yes please, due the fact, that we have migrated all our code now and do no longer have an RTC repo here, I have no chance to reproduce nor test this...

akoptelov commented 6 years ago

@reinhapa Closing this issue.