fabacab / git-archive-all.sh

A bash shell script wrapper for git-archive that archives a git superproject and its submodules, if it has any.
214 stars 86 forks source link

question : why you did not use `git submodule` command #16

Closed k-okada closed 10 years ago

k-okada commented 10 years ago

Hi,

we're currently discussing[1] why did you crawl directory to find submodule directory, and not using git submodule foreach command. I would be happy if you give us any comment on that.

git archive -o hoge.tar hoge/
git submodule foreach 'tar -C .. -rvf hoge.tar $path'

[1] https://github.com/vcstools/vcstools/pull/88#issuecomment-43717263

fabacab commented 10 years ago

git submodule foreach was introduced in version 1.6.1, whereas git-archive-all.sh was written in July 2008, when the most recent version of git was 1.5.6 (see the Git Wiki homepage "News" section). In other words, git submodule foreach did not exist at the time I wrote this script.