interpret_branch_name: factor out upstream handling
commita39c14af82e973ba1502888e89585b7501721ede
authorJeff King <peff@peff.net>
Wed, 15 Jan 2014 08:26:33 +0000 (15 03:26 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2014 20:38:30 +0000 (15 12:38 -0800)
treeab15945e861ee38c7340afcf077f42056dce520c
parent4224916ae979204f13db2996d9e32490e0acb90f
interpret_branch_name: factor out upstream handling

This function checks a few different @{}-constructs. The
early part checks for and dispatches us to helpers for each
construct, but the code for handling @{upstream} is inline.

Let's factor this out into its own function. This makes
interpret_branch_name more readable, and will make it much
simpler to further refactor the function in future patches.

While we're at it, let's also break apart the refactored
code into a few helper functions. These will be useful if we
eventually implement similar @{upstream}-like constructs.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c