From: Felipe Contreras Date: Sat, 28 Sep 2013 22:03:32 GMT Subject: [PATCH v2 07/44] request-pull: trivial simplification Message-ID: <1380405849-13000-8-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1380405849-13000-1-git-send-email-felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras --- git-request-pull.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/git-request-pull.sh b/git-request-pull.sh index c970244..d8b4c3c 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -86,25 +86,19 @@ find_matching_ref=' } } - my ($tagged, $branch, $found); + my ($found); while () { my ($sha1, $ref, $deref) = /^(\S+)\s+(\S+?)(\^\{\})?$/; next unless ($sha1 eq $ARGV[1]); $found = abbr($ref); if ($deref && $ref eq "refs/tags/$ARGV[2]") { - $tagged = $found; last; } if ($ref eq $ARGV[0]) { - $exact = $found; last; } } - if ($tagged) { - print "$tagged\n"; - } elsif ($exact) { - print "$exact\n"; - } elsif ($found) { + if ($found) { print "$found\n"; } ' -- 1.8.4-fc