I’m writing an importer from Git to Plastic SCM and I found one case I wasn’t aware of:
M 100644 :31624 activesupport/lib/active_support/core_ext/array/conversions.rb
M 100644 :31625 activesupport/lib/active_support/vendor.rb
M 160000 70ab0f3cc5921cc67e09741939a08b2582d707cb activesupport/lib/active_support/vendor/i18n-0.0.1
As you can see, the last element (exported with fast-export from the Git repo itself) enters a blob instead of a mark. Why does it happen? Is there a way to “force” all objects to be exported as marks??
Thanks
In git trees, a file mode of
1600000indicates that an entry,activesupport/lib/active_support/vendor/i18n-0.0.1in this case, is a submodule. Submodules are stored in trees as the object name (i.e. the SHA1sum) of the commit that the submodule should be at, and that’s the value you’re seeing in the output. Whatfast-exportis outputting is sufficient forfast-importto reconstruct the tree such thatgit submodule update --initin the new repository will initialize and update the submodule to the right version. I’m afraid I’m not sure if there’s an equivalent concept in your traget SCM to git’s submodules.