2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
16 [ -z "$topic" ] || die "-i and -w are mutually exclusive"
19 [ -z "$topic" ] || die "-i and -w are mutually exclusive"
22 echo "Usage: tg [...] files [-i | -w] [NAME]" >&2
25 [ -z "$name" ] || die "name already specified ($name)"
31 [ -n "$name" -a -n "$topic" ] &&
32 die "-i/-w are mutually exclusive with NAME"
34 [ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
35 base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
36 die "not a TopGit-controlled branch"
38 b_tree=$(pretty_tree "$name" -b)
39 t_tree=$(pretty_tree "$name" $topic)
41 git diff-tree --name-only -r $b_tree $t_tree