Browse Source
When encountering a submodule entry, "jgit archive" tries to write its content verbatim as an entry to the archive, which fails with a JGitInternalException wrapping a MissingObjectException because the submodule repository commits are typically not part of the superproject. When a subproject is available (for example because it has been checked out as a subdirectory of a superproject worktree), it would be nice to recurse into it and make one archive recording the state of the entire project. Unfortunately sometimes the subproject is not available or it can be hard to find (e.g., it can be on another server). Even when some subprojects are available, "jgit archive" should not produce different output for the same tree depending on which subprojects it has easy access to, so there is no obvious good default behavior that recurses without relying on access to all subprojects. Instead, replace each submodule entry with a placeholder empty directory. "git archive" does the same. Change-Id: I1295086037b77fc948b3f93c21d47341e25483e5 Signed-off-by: Jonathan Nieder <jrn@google.com>stable-3.3
Jonathan Nieder
11 years ago
2 changed files with 50 additions and 3 deletions
Loading…
Reference in new issue