2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
16 [ -z "$head_from" ] || die
"-i and -w are mutually exclusive"
19 echo "Usage: tg [...] files [-i | -w] [<name>]" >&2
22 [ -z "$name" ] || die
"name already specified ($name)"
28 head="$(git symbolic-ref HEAD)"
29 head="${head#refs/heads/}"
33 base_rev
="$(git rev-parse --short --verify "refs
/top-bases
/$name" 2>/dev/null)" ||
34 die
"not a TopGit-controlled branch"
36 if [ -n "$head_from" ] && [ "$name" != "$head" ]; then
37 die
"$head_from makes only sense for the current branch"
40 b_tree
=$
(pretty_tree
"$name" -b)
41 t_tree
=$
(pretty_tree
"$name" $head_from)
43 git diff-tree
--name-only -r $b_tree $t_tree