2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
11 echo "Usage: tg [...] depend add NAME" >&2
17 subcmd
="$1"; shift ||
:
24 die
"unknown subcommand ($subcmd)";;
33 [ -z "$name" ] || die
"name already specified ($name)"
41 [ -n "$name" ] || die
"no branch name specified"
42 branchrev
="$(git rev-parse --verify "$name" 2>/dev/null)" ||
43 die
"invalid branch name: $name"
45 ## Record new dependency
47 echo "$name" >>"$root_dir/.topdeps"
48 git add
-f "$root_dir/.topdeps"
49 git commit
-m"New TopGit dependency: $name"