git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Add submodule-support to git archive

From
LHLars Hjemli <hjemli@gmail.com>
Date
Jan 25, 2009, 00:52 UTC
Message-ID
<1232844726-14902-1-git-send-email-hjemli@gmail.com>

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
Next: Lars Hjemli
Message 1 of 14 in “Add submodule-support to git archive”
  1. 0/2 Add submodule-support to git archiveLars Hjemli, Jan 25, 2009
  2. 1/2 tree.c: allow read_tree_recursive() to traverse gitlink entriesLars Hjemli, Jan 25, 2009
  3. 2/2 archive.c: add support for --submodules[=(all|checkedout)]Lars Hjemli, Jan 25, 2009
  4. Johannes SchindelinJan 25, 2009
  5. Lars HjemliJan 25, 2009
  6. Johannes SchindelinJan 25, 2009
  7. Johannes SchindelinJan 25, 2009
  8. Lars HjemliJan 25, 2009
  9. Nanako ShiraishiJan 25, 2009
  10. Lars HjemliJan 25, 2009
  11. Junio C HamanoJan 25, 2009
  12. Lars HjemliJan 25, 2009
  13. Johannes SchindelinJan 25, 2009
  14. Junio C HamanoJan 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.