Avoid costly findMergedInto during push to refs/for/*

It is uncommon to automatically close a change by first getting the
commit into a branch or tag, and then later pushing that commit to
refs/for/* and expecting Gerrit will close the change by matching
the Change-Id in the commit message footer.  Most of the time a
change is automatically closed by a direct branch push, and doesn't
need this fallback driven by Change-Id in the message.

However, leave in the fix for GERRIT-54 e6b34af43cae ("Close change
if a replacement patch set is already submitted") to permit users
to close a change by pushing the exact commit to refs/changes/NNNN.
This format is deprecated and will be removed in the future anyway.

Change-Id: Ie5d2af4c1aa2a1bb301b29332e856babf6288b17
(cherry picked from commit 718fd9bcccc290bdbca8e7c67aa28eee901221d3)
1 file changed