#!/usr/bin/env bash # # Change the remote branch repository URL. # Copyright (c) Petr Baudis, 2005 # # Takes the branch name and new source location as parameters. # # Terminology note: This command concerns remote branches, not the local # ones (those managed by `cg-switch`). USAGE="cg-branch-chg BRANCH_NAME NEW_LOCATION" . "${COGITO_LIB}"cg-Xlib || exit 1 name="${ARGS[0]}" location="${ARGS[1]}" ([ -n "$name" ] && [ -n "$location" ]) || usage [ -s "$_git/branches/$name" ] || die "branch does not exist" echo "$location" >"$_git/branches/$name"