Skip to content

Commit 551ce28

Browse files
Eric WongJunio C Hamano
authored andcommitted
git-svn: 0.9.1: add --version and copyright/license (GPL v2+) information
Signed-off-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 96a40b2 commit 551ce28

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

contrib/git-svn/git-svn.perl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/usr/bin/env perl
2+
# Copyright (C) 2006, Eric Wong <[email protected]>
3+
# License: GPL v2 or later
24
use warnings;
35
use strict;
46
use vars qw/ $AUTHOR $VERSION
57
$SVN_URL $SVN_INFO $SVN_WC
68
$GIT_SVN_INDEX $GIT_SVN
79
$GIT_DIR $REV_DIR/;
810
$AUTHOR = 'Eric Wong <[email protected]>';
9-
$VERSION = '0.9.0';
11+
$VERSION = '0.9.1';
1012
$GIT_DIR = $ENV{GIT_DIR} || "$ENV{PWD}/.git";
1113
$GIT_SVN = $ENV{GIT_SVN_ID} || 'git-svn';
1214
$GIT_SVN_INDEX = "$GIT_DIR/$GIT_SVN/index";
@@ -31,7 +33,7 @@
3133
my $sha1 = qr/[a-f\d]{40}/;
3234
my $sha1_short = qr/[a-f\d]{6,40}/;
3335
my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
34-
$_find_copies_harder, $_l);
36+
$_find_copies_harder, $_l, $_version);
3537

3638
GetOptions( 'revision|r=s' => \$_revision,
3739
'no-ignore-externals' => \$_no_ignore_ext,
@@ -41,6 +43,7 @@
4143
'help|H|h' => \$_help,
4244
'find-copies-harder' => \$_find_copies_harder,
4345
'l=i' => \$_l,
46+
'version|V' => \$_version,
4447
'no-stop-on-copy' => \$_no_stop_copy );
4548
my %cmd = (
4649
fetch => [ \&fetch, "Download new revisions from SVN" ],
@@ -66,6 +69,7 @@
6669
}
6770
}
6871
usage(0) if $_help;
72+
version() if $_version;
6973
usage(1) unless (defined $cmd);
7074
svn_check_ignore_externals();
7175
$cmd{$cmd}->[0]->(@ARGV);
@@ -91,6 +95,11 @@ sub usage {
9195
exit $exit;
9296
}
9397

98+
sub version {
99+
print "git-svn version $VERSION\n";
100+
exit 0;
101+
}
102+
94103
sub rebuild {
95104
$SVN_URL = shift or undef;
96105
my $repo_uuid;

0 commit comments

Comments
 (0)