remote: clean-up by returning early to avoid one indentation

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Bert Wesarg 2020-01-27 08:04:28 +01:00 committed by Junio C Hamano
parent 88f8576eda
commit 1a83068c26

View File

@ -263,7 +263,6 @@ static const char *abbrev_ref(const char *name, const char *prefix)
static int config_read_branches(const char *key, const char *value, void *cb)
{
if (starts_with(key, "branch.")) {
const char *orig_key = key;
char *name;
struct string_list_item *item;
@ -271,6 +270,9 @@ static int config_read_branches(const char *key, const char *value, void *cb)
enum { REMOTE, MERGE, REBASE } type;
size_t key_len;
if (!starts_with(key, "branch."))
return 0;
key += 7;
if (strip_suffix(key, ".remote", &key_len)) {
name = xmemdupz(key, key_len);
@ -310,7 +312,7 @@ static int config_read_branches(const char *key, const char *value, void *cb)
* truth value with >= REBASE_TRUE.
*/
info->rebase = rebase_parse_value(value);
}
return 0;
}