문제

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 1600000 indicates that an entry, activesupport/lib/active_support/vendor/i18n-0.0.1 in 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. What fast-export is outputting is sufficient for fast-import to reconstruct the tree such that git submodule update --init in 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top