remote: separate out the remote_find_tracking logic into query_refspecs
authorCarlos Martín Nieto <cmn@elego.de>
Sat, 15 Oct 2011 05:04:24 +0000 (07:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 04:55:05 +0000 (21:55 -0700)
commitc500352e0de75db34b1a071a9e250b815d10f95b
tree423e941d02aad451b23328704131122a42c61372
parent43a8a04a11d9c3870a4b20fb2d82f89631390e0a
remote: separate out the remote_find_tracking logic into query_refspecs

Move the body of remote_find_tracking() to a new helper query_refspecs()
that finds a refspec that matches and applies the transformation, but
explicitly takes the list of refspecs, and make remote_find_tracking() a
thin wrapper of it.

Make apply_refspecs() also use query_refspecs().

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c