{"thread":{"id":"21074","subject":"Re: cgit suggestion","startedAt":"2009-09-27T19:02:30Z","lastAt":"2009-10-16T00:13:27Z","messageCount":2,"participants":["Alexey Nezhdanov","Lars Hjemli"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"123904","messageId":"200909272302.30742.snakeru@gmail.com","threadId":"21074","inReplyTo":"e95c2db40909252314t12abb6e2w9b6e9c34c7a724a5@mail.gmail.com","subject":"Re: cgit suggestion","fromName":"Alexey Nezhdanov","fromEmail":"snakeru@gmail.com","sentAt":"2009-09-27T19:02:30Z","receivedAt":"2009-09-27T19:02:30Z","isPatch":false,"sender":{"key":"snakeru@gmail.com","avatar":null},"body":"Hello Lars.\nHere is the diff. It adds feature of downloading 'named' tarball from the tag \ndescription page.\n\nOn Saturday 26 September 2009 10:14:19 Alexey Nezhdanov wrote:\n> Hello Lars.\n> Discovered a cgit for myself throught the LWN article:\n> http://lwn.net/Articles/351798/\n>\n> Great thing! I'm impressed, will use it instead of gitweb (when I'll need a\n> web interface anyway ;-P).\n> Came upon a thing though that I consider to be an inconvenience.\n>\n> When I click on a tag, for instance:\n> http://hjemli.net/git/cgit/tag/?id=v0.8.2.2\n> there is no download link of assotiated object. And if I click on a 'tagged\n> object' I get download links, but they are referenced by SHA-1 format.\n> So they can not be used as a .orig.tar.gz package or even just stored 'for\n> a future use' since SHA-1 is not human readable.\n> So I propose putting download links onto tag page for the objects of type\n> 'tree' and 'commit'.\n> If you want me to write a patch - I'll do.\n>\n> Regards\n> Alexey Nezhdanov.\n\n\n\n-- \nSincerely yours\nAlexey Nezhdanov\n\n\nFrom b70365dfab8bb9ade733ea8387880b2b2cf4baa4 Mon Sep 17 00:00:00 2001\nFrom: Alexey Nezhdanov <snakeru@gmail.com>\nDate: Sun, 27 Sep 2009 23:00:29 +0400\nSubject: [PATCH] Ad-hoc tarball downloads from the tag description page.\n\nSigned-off-by: Alexey Nezhdanov <snakeru@gmail.com>\n---\n ui-tag.c |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/ui-tag.c b/ui-tag.c\nindex c2d72af..da93b7a 100644\n--- a/ui-tag.c\n+++ b/ui-tag.c\n@@ -76,6 +76,12 @@ void cgit_print_tag(char *revname)\n \t\thtml(\"<tr><td>Tagged object</td><td>\");\n \t\tcgit_object_link(tag->tagged);\n \t\thtml(\"</td></tr>\\n\");\n+                if (ctx.repo->snapshots) {\n+                        html(\"<tr><th>download</th><td class='sha1'>\");\n+                        cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,\n+                                                  revname, ctx.repo->snapshots);\n+                        html(\"</td></tr>\");\n+                }\n \t\thtml(\"</table>\\n\");\n \t\tprint_tag_content(info->msg);\n \t} else {\n@@ -86,6 +92,12 @@ void cgit_print_tag(char *revname)\n \t\thtml(\"<tr><td>Tagged object</td><td>\");\n \t\tcgit_object_link(obj);\n \t\thtml(\"</td></tr>\\n\");\n+                if (ctx.repo->snapshots) {\n+                        html(\"<tr><th>download</th><td class='sha1'>\");\n+                        cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,\n+                                                  revname, ctx.repo->snapshots);\n+                        html(\"</td></tr>\");\n+                }\n \t\thtml(\"</table>\\n\");\n         }\n \treturn;\n-- \n1.5.6.3\n\n"},{"id":"125124","messageId":"8c5c35580910151713q5dda789fn7143124149b29d26@mail.gmail.com","threadId":"21074","inReplyTo":"200909272302.30742.snakeru@gmail.com","subject":"Re: cgit suggestion","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2009-10-16T00:13:27Z","receivedAt":"2009-10-16T00:13:27Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"[* Sorry for the late reply *]\n\nOn Sun, Sep 27, 2009 at 21:02, Alexey Nezhdanov <snakeru@gmail.com> wrote:\n> Here is the diff. It adds feature of downloading 'named' tarball from the tag\n> description page.\n\nThanks, I've applied the patch (slightly modified) to my master branch\nand pushed the result to http://hjemli.net/git/cgit.\n\n--\nlarsh\n"}]}