Include submodules in git_archive_id()#1411
Conversation
`git archive` doesn't have an option to include submodules, because obviously submodules can never be easy to work with. These arcane commands are the simplest solution I can think of, and seems to work well.
bflanagin
left a comment
There was a problem hiding this comment.
Code looks good, but I need guidance on how to test it on our end before we can approve the change. Suggestions on how to use the associated command /scripts/ci is needed.
|
@ids1024 I think this function can run in parallel, which would be a problem with the worktree command. Do you think this is the case? |
|
In parallel on different branches of the same repo? I think this should still work since it adds a worktree in a random out-of-tree directory, and git should use some form of locking to prevent synchronization bugs with two operations on the same repo. But it's hard to be sure because I don't have much experience with git worktrees, and it's kind of a horrible hack around Though looking at this again, it might be better to just call |
|
Then again, that may run into other issues since it would need to retrieve the commit used for the submodule in the branch it is trying to archive, In gnome-control-center, I just worked around this by moving the upstream submodule in-tree. Perhaps it's best to stick with that, but I really wish |
git archivedoesn't have an option to include submodules, because obviously submodules can never be easy to work with. These arcane commands are the simplest solution I can think of, and seems to work well.