summaryrefslogtreecommitdiffstats
path: root/ug-deps
blob: b970c9a32a5c7c3d2dd139b866e828e57a9d9664 (plain)
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
#! /bin/sh

set -e

## parse options ## {{{1
UG_OPTIONS_SPEC="\
ug deps [patchrev]*
--
"

. "$UG_EXEC_PATH/uglib.sh"

while test $# != 0; do
	case "$1" in
	--)
		shift; break
		;;
	esac
	shift
done

#}}}

# $@ contains the patch commits to show
# default to HEAD if nothing is given
if test "$#" = "0"; then
	set -- HEAD
fi

for patch do
	is_ugish "$patch" || continue # XXX: die?  warn?
	patchrev=$(git rev-parse --verify "$1")
	deps "$patchrev"
done