diff options
author | Martin Langhoff <martin@ng.eduforge.org> | 2005-08-16 17:39:29 +1200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-16 12:09:33 -0700 |
commit | abe0582207c72ec848e78707577c61a98f5c633d (patch) | |
tree | b00f462cee5b02455abdbb476fa7c9e94a9fcb4c /git-cvsimport-script | |
parent | d920032042c9fb3de04db640afe8611dfd4b6c21 (diff) | |
download | git-abe0582207c72ec848e78707577c61a98f5c633d.tar.gz git-abe0582207c72ec848e78707577c61a98f5c633d.tar.xz |
[PATCH] Add -k kill keyword expansion option to git-cvsimport - revised
Early versions of git-cvsimport defaulted to using preexisting keyword
expansion settings. This change preserves compatibility with existing cvs
imports and allows new repository migrations to kill keyword expansion.
After exploration of the different -k modes in the cvs protocol, we use -kk
which kills keyword expansion wherever possible. Against the protocol
spec, -ko and -kb will sometimes expand keywords.
Should improve our chances of detecting merges and reduce imported
repository size.
Signed-off: Martin Langhoff <martin.langhoff@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsimport-script')
-rwxr-xr-x | git-cvsimport-script | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/git-cvsimport-script b/git-cvsimport-script index a389f4896..a6a6f0db3 100755 --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -28,19 +28,19 @@ use POSIX qw(strftime dup2); $SIG{'PIPE'}="IGNORE"; $ENV{'TZ'}="UTC"; -our($opt_h,$opt_o,$opt_v,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i); +our($opt_h,$opt_o,$opt_v,$opt_k,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i); sub usage() { print STDERR <<END; Usage: ${\basename $0} # fetch/update GIT from CVS [ -o branch-for-HEAD ] [ -h ] [ -v ] [ -d CVSROOT ] [ -p opts-for-cvsps ] [ -C GIT_repository ] [ -z fuzz ] - [ -i ] [ CVS_module ] + [ -i ] [ -k ] [ CVS_module ] END exit(1); } -getopts("hivo:d:p:C:z:") or usage(); +getopts("hivko:d:p:C:z:") or usage(); usage if $opt_h; @ARGV <= 1 or usage(); @@ -218,8 +218,10 @@ sub _file { my($self,$fn,$rev) = @_; $self->{'socketo'}->write("Argument -N\n") or return undef; $self->{'socketo'}->write("Argument -P\n") or return undef; - # $self->{'socketo'}->write("Argument -ko\n") or return undef; - # -ko: Linus' version doesn't use it + # -kk: Linus' version doesn't use it - defaults to off + if ($opt_k) { + $self->{'socketo'}->write("Argument -kk\n") or return undef; + } $self->{'socketo'}->write("Argument -r\n") or return undef; $self->{'socketo'}->write("Argument $rev\n") or return undef; $self->{'socketo'}->write("Argument --\n") or return undef; |