Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-01-28 01:38:10 +0300
committerEric Wong <normalperson@yhbt.net>2007-02-23 11:57:10 +0300
commit21819a370839fdae818975967cef384510e4a8cd (patch)
treecaeaf3411ca209ce7f4157aa7763ebd037498cb3 /git-svn.perl
parent6139535436d7ec9808fca75821f14d4d5061f343 (diff)
git-svn: cleanup remove unused function
Also move tz_to_s_offset into Git::SVN::Log since that's the only place it's used now. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl33
1 files changed, 8 insertions, 25 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 4f7ebaf58b..7249d6f417 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -679,29 +679,6 @@ sub cmt_metadata {
command(qw/cat-file commit/, shift)))[-1]);
}
-sub get_commit_time {
- my $cmt = shift;
- my $fh = command_output_pipe(qw/rev-list --pretty=raw -n1/, $cmt);
- while (<$fh>) {
- /^committer\s(?:.+) (\d+) ([\-\+]?\d+)$/ or next;
- my ($s, $tz) = ($1, $2);
- if ($tz =~ s/^\+//) {
- $s += tz_to_s_offset($tz);
- } elsif ($tz =~ s/^\-//) {
- $s -= tz_to_s_offset($tz);
- }
- close $fh;
- return $s;
- }
- die "Can't get commit time for commit: $cmt\n";
-}
-
-sub tz_to_s_offset {
- my ($tz) = @_;
- $tz =~ s/(\d\d)$//;
- return ($1 * 60) + ($tz * 3600);
-}
-
package Git::SVN;
use strict;
use warnings;
@@ -2496,6 +2473,12 @@ sub run_pager {
exec $pager or ::fatal "Can't run pager: $! ($pager)\n";
}
+sub tz_to_s_offset {
+ my ($tz) = @_;
+ $tz =~ s/(\d\d)$//;
+ return ($1 * 60) + ($tz * 3600);
+}
+
sub get_author_info {
my ($dest, $author, $t, $tz) = @_;
$author =~ s/(?:^\s*|\s*$)//g;
@@ -2512,9 +2495,9 @@ sub get_author_info {
$dest->{a} = $au;
# Date::Parse isn't in the standard Perl distro :(
if ($tz =~ s/^\+//) {
- $t += ::tz_to_s_offset($tz);
+ $t += tz_to_s_offset($tz);
} elsif ($tz =~ s/^\-//) {
- $t -= ::tz_to_s_offset($tz);
+ $t -= tz_to_s_offset($tz);
}
$dest->{t_utc} = $t;
}