diff options
author | Petr Baudis <pasky@suse.cz> | 2006-07-03 22:48:01 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-03 18:35:23 -0700 |
commit | c7a30e56840b089c1d110b312475f692b5c1b6a4 (patch) | |
tree | a437a88670b89b7d0b3ab09aaf57553c272daecc /git-send-email.perl | |
parent | 3cb8caf7294bf8909b924ab63ca7d8f90917e677 (diff) | |
download | git-c7a30e56840b089c1d110b312475f692b5c1b6a4.tar.gz |
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-x | git-send-email.perl | 11 |
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'); |