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:
committed by
Junio C Hamano
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)
|
static int config_read_branches(const char *key, const char *value, void *cb)
|
||||||
{
|
{
|
||||||
if (starts_with(key, "branch.")) {
|
|
||||||
const char *orig_key = key;
|
const char *orig_key = key;
|
||||||
char *name;
|
char *name;
|
||||||
struct string_list_item *item;
|
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;
|
enum { REMOTE, MERGE, REBASE } type;
|
||||||
size_t key_len;
|
size_t key_len;
|
||||||
|
|
||||||
|
if (!starts_with(key, "branch."))
|
||||||
|
return 0;
|
||||||
|
|
||||||
key += 7;
|
key += 7;
|
||||||
if (strip_suffix(key, ".remote", &key_len)) {
|
if (strip_suffix(key, ".remote", &key_len)) {
|
||||||
name = xmemdupz(key, 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.
|
* truth value with >= REBASE_TRUE.
|
||||||
*/
|
*/
|
||||||
info->rebase = rebase_parse_value(value);
|
info->rebase = rebase_parse_value(value);
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user