From: Martin Langhoff <martin.langhoff@gmail.com>
To: GIT <git@vger.kernel.org>
Subject: [PATCH] Add -k kill keyword expansion option to git-cvsimport
Date: Mon, 15 Aug 2005 18:51:39 +1200 [thread overview]
Message-ID: <46a038f9050814235140877be7@mail.gmail.com> (raw)
[PATCH] Add -k kill keyword expansion option to git-cvsimport
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.
Should improve our chances of detecting merges and reduce imported
repository size.
Signed-off: Martin Langhoff <martin.langhoff@gmail.com>
---
Documentation/git-cvsimport-script.txt | 7 ++++++-
git-cvsimport-script | 10 ++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
f0b33908e48ac75a1e3f08a3e3159de3a9a371d9
diff --git a/Documentation/git-cvsimport-script.txt
b/Documentation/git-cvsimport-script.txt
--- a/Documentation/git-cvsimport-script.txt
+++ b/Documentation/git-cvsimport-script.txt
@@ -11,7 +11,7 @@ SYNOPSIS
--------
'git-cvsimport-script' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
[ -d <CVSROOT> ] [ -p <options-for-cvsps> ]
- [ -C <GIT_repository> ] [ -i ] [ <CVS_module> ]
+ [ -C <GIT_repository> ] [ -i ] [ -k ] [ <CVS_module> ]
DESCRIPTION
@@ -34,6 +34,11 @@ OPTIONS
ensures the working directory and cache remain untouched and will
not create them if they do not exist.
+-k::
+ Kill keywords: will extract files with -ko from the CVS archive
+ to avoid noisy changesets. Highly recommended, but off by default
+ to preserve compatibility with early imported trees.
+
-o <branch-for-HEAD>::
The 'HEAD' branch from CVS is imported to the 'origin' branch within
the git repository, as 'HEAD' already has a special meaning for git.
diff --git a/git-cvsimport-script b/git-cvsimport-script
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -35,12 +35,12 @@ sub usage() {
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
+ # -ko: Linus' version doesn't use it - defaults to off
+ if ($opt_k) {
+ $self->{'socketo'}->write("Argument -ko\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;
next reply other threads:[~2005-08-15 6:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 6:51 Martin Langhoff [this message]
2005-08-15 6:56 ` [PATCH] Add -k kill keyword expansion option to git-cvsimport Martin Langhoff
2005-08-15 7:12 ` Junio C Hamano
2005-08-15 7:37 ` Martin Langhoff
2005-08-15 7:44 ` Junio C Hamano
2005-08-15 7:52 ` Martin Langhoff
2005-08-15 8:18 ` Junio C Hamano
[not found] ` <46a038f905081501301bd9a801@mail.gmail.com>
2005-08-15 8:48 ` Junio C Hamano
2005-08-15 9:05 ` Martin Langhoff
2005-08-15 11:20 ` Martin Langhoff
2005-08-16 0:12 ` Junio C Hamano
2005-08-16 11:29 ` Martin Langhoff
-- strict thread matches above, loose matches on Subject: below --
2005-08-15 7:10 Martin Langhoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46a038f9050814235140877be7@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).