mirror of
https://git.zx2c4.com/cgit
synced 2024-11-26 02:18:42 +00:00
ui-refs: remove unnecessary sanity check
There is no way for refinfo::refname to be null, and Git will prevent zero-length refs so this check is unnecessary. Signed-off-by: John Keeping <john@keeping.me.uk> Reviewed-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
00ad47bbfa
commit
f0047d2d94
@ -97,9 +97,6 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref)
|
|||||||
struct strbuf filename = STRBUF_INIT;
|
struct strbuf filename = STRBUF_INIT;
|
||||||
size_t prefixlen;
|
size_t prefixlen;
|
||||||
|
|
||||||
if (!ref || strlen(ref) < 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
basename = cgit_snapshot_prefix(repo);
|
basename = cgit_snapshot_prefix(repo);
|
||||||
if (starts_with(ref, basename))
|
if (starts_with(ref, basename))
|
||||||
strbuf_addstr(&filename, ref);
|
strbuf_addstr(&filename, ref);
|
||||||
|
Loading…
Reference in New Issue
Block a user