From f5f4b72a7cc55dc16ef6cedc7bc21c285016755c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 10 Aug 2012 16:59:29 +0200 Subject: [PATCH] update2: Save original STDIN Otherwise, a change of multiple branches sends only one mail, because our invocation of mutt replaces STDIN. --- update2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update2 b/update2 index 5d30726..7d62853 100755 --- a/update2 +++ b/update2 @@ -36,12 +36,13 @@ my @diff_options = ('-C'); sub update_ref($$$); +open ORIG_STDIN, '<&', \*STDIN; open ORIG_STDOUT, '>&', \*STDOUT; if (@ARGV) { update_ref($ARGV[0], $ARGV[1], $ARGV[2]); } else { - while () { + while () { chomp; my ($old, $new, $ref) = /^(\S+) (\S+) (.*)/ or die "Error parsing hook input ($_)\n"; update_ref($ref, $old, $new); -- 2.39.5