Browse files

Generalize subcommand selection in "tg depend"

Prepare "tg depend" for new subcommands by moving the implementation
of "tg add" to a function.

Signed-off-by: Per Cederqvist <>
Signed-off-by: Uwe Kleine-König <>
  • Loading branch information...
1 parent 913035b commit bd0a68e9716f944cb12848bee4649958f7db7eb8 @cederlys cederlys committed with Uwe Kleine-König Aug 24, 2010
Showing with 8 additions and 4 deletions.
  1. +8 −4
@@ -43,10 +43,14 @@ branchrev="$(git rev-parse --verify "$name" 2>/dev/null)" ||
die "invalid branch name: $name"
## Record new dependency
+ echo "$name" >>"$root_dir/.topdeps"
+ git add -f "$root_dir/.topdeps"
+ git commit -m"New TopGit dependency: $name"
+ $tg update
-echo "$name" >>"$root_dir/.topdeps"
-git add -f "$root_dir/.topdeps"
-git commit -m"New TopGit dependency: $name"
-$tg update
# vim:noet

0 comments on commit bd0a68e

Please sign in to comment.