Add submodule-support to git archive
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tree.c: allow read_tree_recursive() to traverse gitlink entriesarchive.c builtin-ls-tree.c merge-recursive.c +1 more | +32 | 2 replies | |
| 2/2 | archive.c: add support for --submodules[=(all|checkedout)]Documentation/ archive.c archive.h +3 more | +228 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Add submodule-support to git archive
This is a cleaned up version of my previous patches which allows git archive to include submodule content in the archive output.
The main difference between this series and the previous ones is that the behaviour of git archive --submodules are now predictable; the content included from submodules is defined by the gitlink entries found when traversing the <tree-ish> specified on the command line, and the set of submodules to include are defined by specifying either --submodules=all or --submodules=checkedout (which is the default mode of operation, i.e. what you get by only specifying --submodules).
To make the --submodules option more userfriendly, any submodule repository discovered during traversal will be registered as an alternate odb (this will typically be required to make the inter-repository traversal succeed).
Finally, the option --submodules=group:<name> is not yet implemented. I wanted to get these first two patches published early since they define the semantics of the --submodules option. Adding a 'group' selector on top is mostly a question of pulling information out of .gitmodules and .git/config, i.e. not very exciting (but it will be done ;-)
Lars Hjemli (2):
tree.c: allow read_tree_recursive() to traverse gitlink entries archive.c: add support for --submodules[=(all|checkedout)]
Documentation/git-archive.txt | 5 ++ archive.c | 81 +++++++++++++++++++++++++- archive.h | 4 + builtin-ls-tree.c | 9 +-- cache.h | 1 + merge-recursive.c | 2 +- sha1_file.c | 11 +++- t/t5001-archive-submodules.sh | 129 +++++++++++++++++++++++++++++++++++++++++ tree.c | 28 +++++++++ 9 files changed, 259 insertions(+), 11 deletions(-) create mode 100755 t/t5001-archive-submodules.sh