Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for dir in a b c d
- do
- git init $dir
- pushd $dir
- touch test
- echo $dir > bob
- git add -A
- git commit -m "Init"
- popd
- done
- pushd b
- git submodule add ../d
- git commit -m "Subbed"
- popd
- pushd a
- git submodule add ../b
- git submodule add ../c
- git submodule update --init --recursive
- git commit -a -m "Double subbed"
- # Testing each of the iteration types
- echo "Normal"
- git submodule foreach "echo \"'ello \$name\""
- echo
- echo "Normal, Recursive"
- git submodule foreach --recursive "echo \"'ello \$name\""
- echo
- echo "Normal, Including Super"
- git submodule foreach --include-super "echo \"'ello \$name\""
- echo
- echo "Normal, Recursive, Including Super"
- git submodule foreach --recursive --include-super "echo \"'ello \$name\""
- echo
- echo "Post-order (exactly the same on its own - disable this?)"
- git submodule foreach --post-order "echo \"'ello \$name\""
- echo
- echo "Post-order, Recursive"
- git submodule foreach --post-order --recursive "echo \"'ello \$name\""
- echo
- echo "Post-order, Including Super"
- git submodule foreach --post-order --include-super "echo \"'ello \$name\""
- echo
- echo "Post-Order, Recursive, Including Super"
- git submodule foreach --post-order --recursive --include-super "echo \"'ello \$name\""
- echo
- popd
- echo <<COMMENT
- Normal
- Entering 'b'
- 'ello b
- Entering 'c'
- 'ello c
- Normal, Recursive
- Entering 'b'
- 'ello b
- Entering 'b/d'
- 'ello d
- Entering 'c'
- 'ello c
- Normal, Including Super
- Entering 'a'
- 'ello a
- Entering 'b'
- 'ello b
- Entering 'c'
- 'ello c
- Normal, Recursive, Including Super
- Entering 'a'
- 'ello a
- Entering 'b'
- 'ello b
- Entering 'b/d'
- 'ello d
- Entering 'c'
- 'ello c
- Post-order (exactly the same on its own - disable this?)
- Entering 'b'
- 'ello b
- Entering 'c'
- 'ello c
- Post-order, Recursive
- Entering 'b/d'
- 'ello d
- Entering 'b'
- 'ello b
- Entering 'c'
- 'ello c
- Post-order, Including Super
- Entering 'b'
- 'ello b
- Entering 'c'
- 'ello c
- Entering 'a'
- 'ello a
- Post-Order, Recursive, Including Super
- Entering 'b/d'
- 'ello d
- Entering 'b'
- 'ello b
- Entering 'c'
- 'ello c
- Entering 'a'
- 'ello a
- COMMENT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement