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:
parent
88f8576eda
commit
1a83068c26
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user