This brings the behavior in line with the manual page,
and makes things less surprising for users.
orig=`{git/query HEAD}
if (~ $#baseref 1)
base=`{git/query $baseref} || exit 'bad base'
-if not if(test -e .git/$new)
+if not if(~ $#newbr 0)
base=`{git/query $new}
if not
base=`{git/query HEAD}
if(! ~ $#baseref 0)
die update would clobber $branch with $baseref
baseref=`$nl{echo -n $new | sed s@refs/heads/@refs/remotes/origin/@}
- echo $baseref
if(! test -e .git/$new)
if(! base=`{git/query $baseref})
die could not find branch $branch
}
echo ref: $new > .git/HEAD
+echo $new: `{git/query $new}
exit ''