summaryrefslogtreecommitdiffabout
path: root/ui-patch.c
Unidiff
Diffstat (limited to 'ui-patch.c') (more/less context) (ignore 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 a77f3f6..68ebb15 100644
--- a/ui-patch.c
+++ b/ui-patch.c
@@ -60,25 +60,25 @@ static void filepair_cb(struct diff_filepair *pair)
60 pair->two->sha1, pair->two->path, pair->two->mode); 60 pair->two->sha1, pair->two->path, pair->two->mode);
61 if (S_ISGITLINK(pair->one->mode) || S_ISGITLINK(pair->two->mode)) { 61 if (S_ISGITLINK(pair->one->mode) || S_ISGITLINK(pair->two->mode)) {
62 if (S_ISGITLINK(pair->one->mode)) 62 if (S_ISGITLINK(pair->one->mode))
63 print_line(fmt("-Subproject %s", sha1_to_hex(pair->one->sha1)), 52); 63 print_line(fmt("-Subproject %s", sha1_to_hex(pair->one->sha1)), 52);
64 if (S_ISGITLINK(pair->two->mode)) 64 if (S_ISGITLINK(pair->two->mode))
65 print_line(fmt("+Subproject %s", sha1_to_hex(pair->two->sha1)), 52); 65 print_line(fmt("+Subproject %s", sha1_to_hex(pair->two->sha1)), 52);
66 return; 66 return;
67 } 67 }
68 if (cgit_diff_files(pair->one->sha1, pair->two->sha1, print_line)) 68 if (cgit_diff_files(pair->one->sha1, pair->two->sha1, print_line))
69 html("Error running diff"); 69 html("Error running diff");
70} 70}
71 71
72void cgit_print_patch(char *hex, struct cacheitem *item) 72void cgit_print_patch(char *hex)
73{ 73{
74 struct commit *commit; 74 struct commit *commit;
75 struct commitinfo *info; 75 struct commitinfo *info;
76 unsigned char sha1[20], old_sha1[20]; 76 unsigned char sha1[20], old_sha1[20];
77 char *patchname; 77 char *patchname;
78 78
79 if (!hex) 79 if (!hex)
80 hex = ctx.qry.head; 80 hex = ctx.qry.head;
81 81
82 if (get_sha1(hex, sha1)) { 82 if (get_sha1(hex, sha1)) {
83 cgit_print_error(fmt("Bad object id: %s", hex)); 83 cgit_print_error(fmt("Bad object id: %s", hex));
84 return; 84 return;