/
git
executable file
·66 lines (64 loc) · 1.21 KB
/
git
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
set -e
echo cd "$(pwd)" >> $SANDBOX_PATH/git.log
echo git "$@" >> $SANDBOX_PATH/git.log
case "$1" in
clone)
mkdir "$3"
echo test data > "$3/file"
;;
pull)
if [ -e .git/commands ]; then
bash .git/commands
fi
if [ -e .git/output ]; then
cat .git/output
else
echo Current branch master is up to date.
fi
if [ -e .git/failure ]; then
exit 1
fi
;;
show)
if [[ "$2" == "abc1237:order-test/.fresh-order" ]]; then
echo d
echo f
echo b
else
echo test data for "$2"
fi
;;
ls-tree)
echo aliases/git.sh
echo aliases/ruby.sh
echo ackrc
echo sedmv
echo recursive-test/foo
echo recursive-test/bar
echo recursive-test/abc/def
echo hidden-test/foo
echo hidden-test/.bar
echo hidden-test/.fresh-order
echo order-test/.fresh-order
echo order-test/a
echo order-test/b
echo order-test/c
echo order-test/d
echo order-test/e
;;
log)
echo 1234567
;;
config)
echo git@github.com:repo/name.git
;;
status)
if [ -e .git/dirty ]; then
echo ' M some-file'
fi
;;
rev-parse)
echo my-remote-name/master
;;
esac