| 1 | #!/bin/bash |
| 2 | |
| 3 | submodule=$(mktemp -d) |
| 4 | repo=$(mktemp -d) |
| 5 | cd $submodule |
| 6 | git init |
| 7 | git commit --allow-empty -m "Initial commit" |
| 8 | cd $repo |
| 9 | git init |
| 10 | git submodule add $submodule submodule |
| 11 | git commit --allow-empty -m "Initial commit" |
| 12 | touch submodule/a |
| 13 | cat >> .git/config <<EOF |
| 14 | [diff] |
| 15 | submodule = log |
| 16 | EOF |
| 17 | git diff | cat |