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:
authorPetr Baudis <pasky@suse.cz>2006-07-04 00:48:01 +0400
committerJunio C Hamano <junkio@cox.net>2006-07-04 05:35:23 +0400
commitc7a30e56840b089c1d110b312475f692b5c1b6a4 (patch)
treea437a88670b89b7d0b3ab09aaf57553c272daecc /git-send-email.perl
parent3cb8caf7294bf8909b924ab63ca7d8f90917e677 (diff)
Git.pm: Introduce ident() and ident_person() methods
These methods can retrieve/parse the author/committer ident. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl11
1 files changed, 2 insertions, 9 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index e794e44925..79e82f5a80 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -84,15 +84,8 @@ foreach my $entry (@bcclist) {
# Now, let's fill any that aren't set in with defaults:
-sub gitvar_ident {
- my ($name) = @_;
- my $val = $repo->command('var', $name);
- my @field = split(/\s+/, $val);
- return join(' ', @field[0...(@field-3)]);
-}
-
-my ($author) = gitvar_ident('GIT_AUTHOR_IDENT');
-my ($committer) = gitvar_ident('GIT_COMMITTER_IDENT');
+my ($author) = $repo->ident_person('author');
+my ($committer) = $repo->ident_person('committer');
my %aliases;
my @alias_files = $repo->config('sendemail.aliasesfile');