Skip to content

Commit bfded87

Browse files
felipecgitster
authored andcommitted
refspec: trivial cleanup
We can remove one level of indentation and make the code clearer. No functional changes. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 72ffeb9 commit bfded87

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

refspec.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,16 @@ void refspec_ref_prefixes(const struct refspec *rs,
272272
else if (item->src && !item->exact_sha1)
273273
prefix = item->src;
274274

275-
if (prefix) {
276-
if (item->pattern) {
277-
const char *glob = strchr(prefix, '*');
278-
strvec_pushf(ref_prefixes, "%.*s",
279-
(int)(glob - prefix),
280-
prefix);
281-
} else {
282-
expand_ref_prefix(ref_prefixes, prefix);
283-
}
275+
if (!prefix)
276+
continue;
277+
278+
if (item->pattern) {
279+
const char *glob = strchr(prefix, '*');
280+
strvec_pushf(ref_prefixes, "%.*s",
281+
(int)(glob - prefix),
282+
prefix);
283+
} else {
284+
expand_ref_prefix(ref_prefixes, prefix);
284285
}
285286
}
286287
}

0 commit comments

Comments
 (0)