Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
cvsimport: Exit if an existing repository doesn't have the right branch.
author
Matthias Urlichs
<smurf@kiste.(none)>
Thu, 30 Jun 2005 20:10:32 +0000
(22:10 +0200)
committer
Matthias Urlichs
<smurf@kiste.(none)>
Thu, 30 Jun 2005 20:10:32 +0000
(22:10 +0200)
git-cvsimport-script
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
e371046
)
diff --git
a/git-cvsimport-script
b/git-cvsimport-script
index 3f157725c8d3bcb8142b2e840d665c49ab8a24d1..1151fb8c0d570a6d45a3e22bcffde58e45847e18 100755
(executable)
--- a/
git-cvsimport-script
+++ b/
git-cvsimport-script
@@
-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";