diff options
| author | John Keeping | 2018-03-31 14:57:22 +0100 |
|---|---|---|
| committer | Jason A. Donenfeld | 2018-06-27 18:11:19 +0200 |
| commit | f0047d2d943788fed2666e1d20c1e0d3c16701d5 (patch) | |
| tree | 05079c78cab3b64fd455698c36adc56a23e57a79 | |
| parent | 00ad47bbfaf7cc5c372e072a5302e871b5250390 (diff) | |
| download | cgit-f0047d2d943788fed2666e1d20c1e0d3c16701d5.tar.gz cgit-f0047d2d943788fed2666e1d20c1e0d3c16701d5.tar.bz2 cgit-f0047d2d943788fed2666e1d20c1e0d3c16701d5.zip | |
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>
| -rw-r--r-- | ui-refs.c | 3 |
1 files changed, 0 insertions, 3 deletions
| @@ -97,9 +97,6 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref) | |||
| 97 | struct strbuf filename = STRBUF_INIT; | 97 | struct strbuf filename = STRBUF_INIT; |
| 98 | size_t prefixlen; | 98 | size_t prefixlen; |
| 99 | 99 | ||
| 100 | if (!ref || strlen(ref) < 1) | ||
| 101 | return; | ||
| 102 | |||
| 103 | basename = cgit_snapshot_prefix(repo); | 100 | basename = cgit_snapshot_prefix(repo); |
| 104 | if (starts_with(ref, basename)) | 101 | if (starts_with(ref, basename)) |
| 105 | strbuf_addstr(&filename, ref); | 102 | strbuf_addstr(&filename, ref); |
