summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>2015-06-30 14:16:47 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-06-30 11:34:35 -0700
commitc46e27aa774eae2ac58f1763afe00108f3a1e5d3 (patch)
tree3dbda4b16d65dd1a6053baf6566fbe48909992b7
parentsend-email: allow use of aliases in the From field of --compose mode (diff)
downloadtgif-c46e27aa774eae2ac58f1763afe00108f3a1e5d3.tar.xz
send-email: minor code refactoring
Group expressions in a single if statement. This avoid checking multiple time if the variable $sender is defined. Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-send-email.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 228400b3e9..09ecad830f 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -774,9 +774,9 @@ if (!$force) {
}
}
-($sender) = expand_aliases($sender) if defined $sender;
-
-if (!defined $sender) {
+if (defined $sender) {
+ ($sender) = expand_aliases($sender);
+} else {
$sender = $repoauthor || $repocommitter || '';
}