--collapse)
driver=collapse;;
-*)
- echo "Usage: tg export ([--collapse] NEWBRANCH | --quilt DIRECTORY)" >&2
+ echo "Usage: tg [...] export ([--collapse] NEWBRANCH | --quilt DIRECTORY)" >&2
exit 1;;
*)
[ -z "$output" ] || die "output already specified ($output)"
echo "Exporting $_dep"
mkdir -p "$(dirname "$filename")"
- tg patch "$_dep" >"$filename"
+ $tg patch "$_dep" >"$filename"
echo "$_dep.diff -p1" >>"$output/series"
}
if [ "$driver" = "collapse" ]; then
[ -n "$output" ] ||
die "no target branch specified"
- ! git rev-parse --verify "$output" >/dev/null 2>&1 ||
+ ! ref_exists "$output" ||
die "target branch '$output' already exists; first run: git branch -D $output"
elif [ "$driver" = "quilt" ]; then