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: tg next [-i | -w] [NAME]" >&2
23 [ -z "$name" ] || die
"name already specified ($name)"
28 head="$(git rev-parse --abbrev-ref=loose HEAD)"
32 git for-each-ref
--format='%(refname)' refs
/top-bases |
34 parent
="${ref#refs/top-bases/}"
37 # select .topdeps source for HEAD branch
38 [ "x$parent" = "x$head" ] ||
41 cat_file
"$parent:.topdeps" $from | fgrep
-qx "$name" ||