#!/usr/bin/env bash
#
# Pulls changes from another branch to the local repository and merge changes.
# Copyright (c) Petr Baudis, 2005
#
# Takes the branch' name, defaulting to "origin".

. ${COGITO_LIB}cg-Xlib

name=$1
[ "$name" ] || { [ -s $_git/refs/heads/origin ] && name=origin; }
[ "$name" ] || die "where to update from?"

cg-pull $name || exit 1
echo
echo "Applying changes..."
cg-merge $name
