refspec: trivial cleanup
We can remove one level of indentation and make the code clearer. No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
72ffeb997e
commit
bfded87570
19
refspec.c
19
refspec.c
|
@ -272,15 +272,16 @@ void refspec_ref_prefixes(const struct refspec *rs,
|
||||||
else if (item->src && !item->exact_sha1)
|
else if (item->src && !item->exact_sha1)
|
||||||
prefix = item->src;
|
prefix = item->src;
|
||||||
|
|
||||||
if (prefix) {
|
if (!prefix)
|
||||||
if (item->pattern) {
|
continue;
|
||||||
const char *glob = strchr(prefix, '*');
|
|
||||||
strvec_pushf(ref_prefixes, "%.*s",
|
if (item->pattern) {
|
||||||
(int)(glob - prefix),
|
const char *glob = strchr(prefix, '*');
|
||||||
prefix);
|
strvec_pushf(ref_prefixes, "%.*s",
|
||||||
} else {
|
(int)(glob - prefix),
|
||||||
expand_ref_prefix(ref_prefixes, prefix);
|
prefix);
|
||||||
}
|
} else {
|
||||||
|
expand_ref_prefix(ref_prefixes, prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue