send-email: detect cycles in alias expansion
authorJeff King <peff@peff.net>
Thu, 23 Jul 2009 11:09:29 +0000 (07:09 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jul 2009 16:32:46 +0000 (09:32 -0700)
With the previous code, an alias cycle like:

$ echo 'alias a b' >aliases
$ echo 'alias b a' >aliases
$ git config sendemail.aliasesfile aliases
$ git config sendemail.aliasfiletype mutt

would put send-email into an infinite loop. This patch
detects the situation and complains to the user.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found