2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
4 # (c) Bert Wesarg <Bert.Wesarg@googlemail.com> 2009
17 [ -z "$head_from" ] || die
"-i and -w are mutually exclusive"
20 echo "Usage: ${tgname:-tg} [...] prev [-i | -w] [<name>]" >&2
23 [ -z "$name" ] || die
"name already specified ($name)"
28 head="$(git rev-parse --revs-only --abbrev-ref=loose HEAD --)"
31 name
="$(verify_topgit_branch "$name")"
32 base_rev
="$(git rev-parse --short --verify "refs
/$topbases/$name" -- 2>/dev/null)" ||
33 die
"not a TopGit-controlled branch"
35 # select .topdeps source for HEAD branch
36 [ "x$name" = "x$head" ] ||
39 cat_file
"refs/heads/$name:.topdeps" $head_from |
while read dep
; do
40 ref_exists
"refs/$topbases/$dep" && branch_annihilated
"$dep" && continue