about summary refs log tree commit diff
path: root/ui-snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-snapshot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui-snapshot.c b/ui-snapshot.c
index b2d95f7..237a75f 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -139,7 +139,8 @@ static int make_snapshot(const struct cgit_snapshot_format *format,
  * pending a 'v' or a 'V' to the remaining snapshot name ("0.7.2" ->
  * "v0.7.2") gives us something valid.
  */
-static const char *get_ref_from_filename(const char *url, const char *filename,
+static const char *get_ref_from_filename(const struct cgit_repo *repo,
+					 const char *filename,
 					 const struct cgit_snapshot_format *format)
 {
 	const char *reponame;
@@ -153,7 +154,7 @@ static const char *get_ref_from_filename(const char *url, const char *filename,
 	if (get_oid(snapshot.buf, &oid) == 0)
 		goto out;
 
-	reponame = cgit_repobasename(url);
+	reponame = cgit_repobasename(repo->url);
 	if (starts_with(snapshot.buf, reponame)) {
 		const char *new_start = snapshot.buf;
 		new_start += strlen(reponame);
@@ -200,7 +201,7 @@ void cgit_print_snapshot(const char *head, const char *hex,
 	}
 
 	if (!hex && dwim) {
-		hex = get_ref_from_filename(ctx.repo->url, filename, f);
+		hex = get_ref_from_filename(ctx.repo, filename, f);
 		if (hex == NULL) {
 			cgit_print_error_page(404, "Not found", "Not found");
 			return;
and the status line is now at the top. The status formatting still needs to be reworked. I also want to try showing the nick in the input window so it really looks like your next message. 2018-09-12Add note about C-oJune McEnroe Why are there so few well usable ctrl key bindings? 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe Ridiculous. 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe