about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2018-03-31 14:57:22 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-06-27 18:11:19 +0200
commitf0047d2d943788fed2666e1d20c1e0d3c16701d5 (patch)
tree05079c78cab3b64fd455698c36adc56a23e57a79
parentui-snapshot: filter permitted snapshot requests (diff)
downloadcgit-pink-f0047d2d943788fed2666e1d20c1e0d3c16701d5.tar.gz
cgit-pink-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.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/ui-refs.c b/ui-refs.c
index 50d9d30..7b95e8b 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -97,9 +97,6 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref)
 	struct strbuf filename = STRBUF_INIT;
 	size_t prefixlen;
 
-	if (!ref || strlen(ref) < 1)
-		return;
-
 	basename = cgit_snapshot_prefix(repo);
 	if (starts_with(ref, basename))
 		strbuf_addstr(&filename, ref);
d62efd73054b396e9d062e6c64159b489bee575&follow=1'>Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe Don't you think it would be better if the setuid bit only gave you permission to do it and didn't do it for you? 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe