cvsimport: Remove master-updating code
The code which tried to update the master branch was somewhat broken. => People should do that manually, with "git merge". Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Matthias Urlichs committed
Mar 7, 2006 at 10:08 UTC
a541211ef4136eb7464c4466d20b60b8580efc44
2 files changed
+8
-25
Documentation/git-cvsimport.txt
+6
@@ -22,6 +22,12 @@ repository, or incrementally import into an existing one.
22
Splitting the CVS log into patch sets is done by 'cvsps'.
23
At least version 2.1 is required.
24
25
+You should *never* do any work of your own on the branches that are
26
+created by git-cvsimport. The initial import will create and populate a
27
+"master" branch from the CVS repository's main branch which you're free
28
+to work with; after that, you need to 'git merge' incremental imports, or
29
+any CVS branches, yourself.
30
+
31
OPTIONS
32
-------
33
-d <CVSROOT>::
git-cvsimport.perl
+2
-25
@@ -452,7 +452,6 @@ chdir($git_tree);
452
453
my $last_branch = "";
454
my $orig_branch = "";
455
-my $forward_master = 0;
455
my %branch_date;
456
457
my $git_dir = $ENV{"GIT_DIR"} || ".git";
@@ -488,21 +487,6 @@ unless(-d $git_dir) {
487
$last_branch = "master";
488
}
489
$orig_branch = $last_branch;
491
- if (-f "$git_dir/CVS2GIT_HEAD") {
492
- die <<EOM;
493
-CVS2GIT_HEAD exists.
494
-Make sure your working directory corresponds to HEAD and remove CVS2GIT_HEAD.
495
-You may need to run
496
-
497
- git read-tree -m -u CVS2GIT_HEAD HEAD
498
-EOM
499
- }
500
- system('cp', "$git_dir/HEAD", "$git_dir/CVS2GIT_HEAD");
501
-
502
- $forward_master =
503
- $opt_o ne 'master' && -f "$git_dir/refs/heads/master" &&
504
- system('cmp', '-s', "$git_dir/refs/heads/master",
505
- "$git_dir/refs/heads/$opt_o") == 0;
490
491
# populate index
492
system('git-read-tree', $last_branch);
@@ -889,17 +873,11 @@ if (defined $orig_git_index) {
873
874
# Now switch back to the branch we were in before all of this happened
875
if($orig_branch) {
892
- print "DONE\n" if $opt_v;
893
- system("cp","$git_dir/refs/heads/$opt_o","$git_dir/refs/heads/master")
894
- if $forward_master;
895
- unless ($opt_i) {
896
- system('git-read-tree', '-m', '-u', 'CVS2GIT_HEAD', 'HEAD');
897
- die "read-tree failed: $?\n" if $?;
898
- }
876
+ print "DONE; you may need to merge manually.\n" if $opt_v;
877
} else {
878
$orig_branch = "master";
879
print "DONE; creating $orig_branch branch\n" if $opt_v;
902
- system("cp","$git_dir/refs/heads/$opt_o","$git_dir/refs/heads/master")
880
+ system("git-update-ref", "refs/heads/master", "refs/heads/$opt_o")
881
unless -f "$git_dir/refs/heads/master";
882
system('git-update-ref', 'HEAD', "$orig_branch");
883
unless ($opt_i) {
@@ -907,4 +885,3 @@ if($orig_branch) {
885
die "checkout failed: $?\n" if $?;
886
}
887
}
910
-unlink("$git_dir/CVS2GIT_HEAD");