]> arthur.barton.de Git - bup.git/blob - cmd-join.sh
Automatically handle "--no-" prefix on long options.
[bup.git] / cmd-join.sh
1 #!/bin/sh
2 set -e
3
4 get_one()
5 {
6     local typ="$1"
7     local sha="$2"
8     if [ "$typ" = "tree" ]; then
9         git cat-file -p "$x" | while read nmode ntyp nsha njunk; do
10             get_one $ntyp $nsha
11         done
12     else
13         git cat-file blob "$sha"
14     fi
15 }
16
17 while read x junk; do
18     typ="$(git cat-file -t "$x")"
19     get_one "$typ" "$x"
20 done