remote.c: introduce branch_get_upstream helper
authorJeff King <peff@peff.net>
Thu, 21 May 2015 04:45:28 +0000 (00:45 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 May 2015 18:04:42 +0000 (11:04 -0700)
All of the information needed to find the @{upstream} of a
branch is included in the branch struct, but callers have to
navigate a series of possible-NULL values to get there.
Let's wrap that logic up in an easy-to-read helper.

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