cvsimport: Exit if an existing repository doesn't have the right branch.

This commit is contained in:
Matthias Urlichs 2005-06-30 22:10:32 +02:00
Родитель e371046b64
Коммит 4c24e089a3
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -338,6 +338,11 @@ unless(-d $git_dir) {
$last_branch = $opt_o;
$orig_branch = "";
} else {
-f "$git_dir/refs/head/$opt_o"
or die "Branch '$opt_o' does not exist.\n".
"Either use the correct '-o branch' option,\n".
"or import to a new repository.\n";
$last_branch = basename(readlink("$git_dir/HEAD"));
unless($last_branch) {
warn "Cannot read the last branch name: $! -- assuming 'master'\n";