about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--cmd.c2
-rw-r--r--ui-commit.c4
-rw-r--r--ui-commit.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/cmd.c b/cmd.c
index a9e426a..893ae25 100644
--- a/cmd.c
+++ b/cmd.c
@@ -51,7 +51,7 @@ static void blob_fn(struct cgit_context *ctx)
 
 static void commit_fn(struct cgit_context *ctx)
 {
-	cgit_print_commit(ctx->qry.sha1);
+	cgit_print_commit(ctx->qry.sha1, ctx->qry.path);
 }
 
 static void diff_fn(struct cgit_context *ctx)
diff --git a/ui-commit.c b/ui-commit.c
index b5e3c01..2f4c6d4 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -12,7 +12,7 @@
 #include "ui-diff.h"
 #include "ui-log.h"
 
-void cgit_print_commit(char *hex)
+void cgit_print_commit(char *hex, const char *prefix)
 {
 	struct commit *commit, *parent;
 	struct commitinfo *info;
@@ -117,7 +117,7 @@ void cgit_print_commit(char *hex)
 			tmp = sha1_to_hex(commit->parents->item->object.sha1);
 		else
 			tmp = NULL;
-		cgit_print_diff(ctx.qry.sha1, tmp, NULL);
+		cgit_print_diff(ctx.qry.sha1, tmp, prefix);
 	}
 	cgit_free_commitinfo(info);
 }
diff --git a/ui-commit.h b/ui-commit.h
index 40bcb31..8198b4b 100644
--- a/ui-commit.h
+++ b/ui-commit.h
@@ -1,6 +1,6 @@
 #ifndef UI_COMMIT_H
 #define UI_COMMIT_H
 
-extern void cgit_print_commit(char *hex);
+extern void cgit_print_commit(char *hex, const char *prefix);
 
 #endif /* UI_COMMIT_H */
20 16:05:24 -0500'>2022-02-20Assert return values in edit testsJune McEnroe 2022-02-20Move mbs out of struct Edit, use a global bufferJune McEnroe 2022-02-20Clear edit buffer before running commandJune McEnroe 2022-02-20Show indicator in status when window has pending inputJune McEnroe 2022-02-20Use separate edit buffers for each IDJune McEnroe 2022-02-20Make sure new cap is actually larger than new lengthJune McEnroe 2022-02-20Remove unused mbs.len field from struct EditJune McEnroe 2022-02-19Remove unneeded includes in ui.cJune McEnroe 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe 2022-02-18Implement new line editing "library"June McEnroe 2022-02-18Simplify cursor positioning in inputJune McEnroe 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe