]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
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)
commita9f9f8cc1f59104257eb1a11a2d048f54dd92ee6
tree2d9d48360152e6090d6c6ebf7591017cb7709083
parent8770e6fbb28dffdf9e00d05365120e438d3d236f
remote.c: introduce branch_get_upstream helper

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>
builtin/branch.c
builtin/for-each-ref.c
builtin/log.c
remote.c
remote.h