-rw-r--r-- | ui-patch.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |