summaryrefslogtreecommitdiffabout
path: root/ui-patch.c
Side-by-side diff
Diffstat (limited to 'ui-patch.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-patch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-patch.c b/ui-patch.c
index e7a010a..1da0a27 100644
--- a/ui-patch.c
+++ b/ui-patch.c
@@ -71,17 +71,17 @@ static void filepair_cb(struct diff_filepair *pair)
void cgit_print_patch(char *hex, struct cacheitem *item)
{
struct commit *commit;
struct commitinfo *info;
unsigned char sha1[20], old_sha1[20];
char *patchname;
if (!hex)
- hex = cgit_query_head;
+ hex = ctx.qry.head;
if (get_sha1(hex, sha1)) {
cgit_print_error(fmt("Bad object id: %s", hex));
return;
}
commit = lookup_commit_reference(sha1);
if (!commit) {
cgit_print_error(fmt("Bad commit reference: %s", hex));