From 6de307baf2ff5b1f01c0f733e7c1319c8d61e784 Mon Sep 17 00:00:00 2001 From: Todd Persen Date: Tue, 13 Dec 2011 16:03:21 -0500 Subject: [PATCH] Setting an email without a defined prefix was completely busted. Now it's not. --- bin/git-pair | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/git-pair b/bin/git-pair index 4cec5a1..8557797 100755 --- a/bin/git-pair +++ b/bin/git-pair @@ -87,12 +87,8 @@ if authors.any? else authors = names[0..-2].join(", ") + " & " + names.last end - email = - if email_prefix = config['email']['prefix'] - "#{([email_prefix] + emails).join('+')}@#{config['email']['domain']}" - else - config['email'] - end + + email = "#{([config['email']['prefix']] + emails).compact.join('+')}@#{config['email']['domain']}" system(%Q{git config #{global_config_string} user.name "#{authors}"}) system(%Q{git config #{global_config_string} user.email "#{email}"}) else