summaryrefslogtreecommitdiff
path: root/etc/examples/60-submodule
blob: c7830db519f00b68cbd13519b76f8fefc1dfcf86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

submodule=$(mktemp -d)
repo=$(mktemp -d)
cd $submodule
git init
git commit --allow-empty -m "Initial commit"
cd $repo
git init
git submodule add $submodule submodule
git commit --allow-empty -m "Initial commit"
touch submodule/a
cat >> .git/config <<EOF
[diff]
    submodule = log
EOF
git diff | cat