Open jhedwardyang opened 5 years ago
it takes about the same time with or without half-open enabled:
$ time git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'
Merging meta-repo commit 720f26ec535e80aec6ab1392037cf7e86eb984eb.
real 0m3.939s user 0m2.133s sys 0m0.875s
$ time git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'
Merging meta-repo commits f132442efc3a326188f1c6afc3547a3fc0512a19 and 720f26ec535e80aec6ab1392037cf7e86eb984eb Merge commit created at 2f876012e0c856430f8cfc8855b49da298a1ddc2.
real 0m2.212s user 0m1.657s sys 0m0.599s
The reason is that it takes seconds to merge is because this repo has >6000 submodules and git-meta process iterate over all submodules twice during the merge. One for simple changes like adding
, renaming
or deleting
submodules and the other iteration is for complicated merge conflicts if there are any.
Does it iterate over unchanged modules? If it doesn't already contain the optimization, it seems like merge ought to skip submodules where the submodule sha is the same in both meta commits.
On Thu, Feb 14, 2019 at 7:13 PM shijing notifications@github.com wrote:
it takes about the same time with or without half-open enabled: without half-open module:
$ time git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'
Merging meta-repo commit 720f26ec535e80aec6ab1392037cf7e86eb984eb.
real 0m3.939s user 0m2.133s sys 0m0.875s
with half-open module:
$ time git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'
Merging meta-repo commits f132442efc3a326188f1c6afc3547a3fc0512a19 and 720f26ec535e80aec6ab1392037cf7e86eb984eb Merge commit created at 2f876012e0c856430f8cfc8855b49da298a1ddc2.
real 0m2.212s user 0m1.657s sys 0m0.599s
The reason is that it takes seconds to merge is because this repo has
6000 submodules and git-meta process iterate over all submodules twice during the merge. One for simple changes like adding, renaming or deleting submodules and the other iteration is for complicated merge conflicts if there are any.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/twosigma/git-meta/issues/691#issuecomment-463855294, or mute the thread https://github.com/notifications/unsubscribe-auth/AAO6IulUQLdn-McHIfQrpNJOxrptvgbyks5vNfuYgaJpZM4a8CtH .
Repro steps:
Expected:
Actual: