git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: cgit suggestion
       [not found] <e95c2db40909252314t12abb6e2w9b6e9c34c7a724a5@mail.gmail.com>
@ 2009-09-27 19:02 ` Alexey Nezhdanov
  2009-10-16  0:13   ` Lars Hjemli
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Nezhdanov @ 2009-09-27 19:02 UTC (permalink / raw)
  To: hjemli; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

Hello Lars.
Here is the diff. It adds feature of downloading 'named' tarball from the tag 
description page.

On Saturday 26 September 2009 10:14:19 Alexey Nezhdanov wrote:
> Hello Lars.
> Discovered a cgit for myself throught the LWN article:
> http://lwn.net/Articles/351798/
>
> Great thing! I'm impressed, will use it instead of gitweb (when I'll need a
> web interface anyway ;-P).
> Came upon a thing though that I consider to be an inconvenience.
>
> When I click on a tag, for instance:
> http://hjemli.net/git/cgit/tag/?id=v0.8.2.2
> there is no download link of assotiated object. And if I click on a 'tagged
> object' I get download links, but they are referenced by SHA-1 format.
> So they can not be used as a .orig.tar.gz package or even just stored 'for
> a future use' since SHA-1 is not human readable.
> So I propose putting download links onto tag page for the objects of type
> 'tree' and 'commit'.
> If you want me to write a patch - I'll do.
>
> Regards
> Alexey Nezhdanov.



-- 
Sincerely yours
Alexey Nezhdanov

[-- Attachment #2: 0001-Ad-hoc-tarball-downloads-from-the-tag-description-pa.patch --]
[-- Type: text/x-diff, Size: 1612 bytes --]

From b70365dfab8bb9ade733ea8387880b2b2cf4baa4 Mon Sep 17 00:00:00 2001
From: Alexey Nezhdanov <snakeru@gmail.com>
Date: Sun, 27 Sep 2009 23:00:29 +0400
Subject: [PATCH] Ad-hoc tarball downloads from the tag description page.

Signed-off-by: Alexey Nezhdanov <snakeru@gmail.com>
---
 ui-tag.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ui-tag.c b/ui-tag.c
index c2d72af..da93b7a 100644
--- a/ui-tag.c
+++ b/ui-tag.c
@@ -76,6 +76,12 @@ void cgit_print_tag(char *revname)
 		html("<tr><td>Tagged object</td><td>");
 		cgit_object_link(tag->tagged);
 		html("</td></tr>\n");
+                if (ctx.repo->snapshots) {
+                        html("<tr><th>download</th><td class='sha1'>");
+                        cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
+                                                  revname, ctx.repo->snapshots);
+                        html("</td></tr>");
+                }
 		html("</table>\n");
 		print_tag_content(info->msg);
 	} else {
@@ -86,6 +92,12 @@ void cgit_print_tag(char *revname)
 		html("<tr><td>Tagged object</td><td>");
 		cgit_object_link(obj);
 		html("</td></tr>\n");
+                if (ctx.repo->snapshots) {
+                        html("<tr><th>download</th><td class='sha1'>");
+                        cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
+                                                  revname, ctx.repo->snapshots);
+                        html("</td></tr>");
+                }
 		html("</table>\n");
         }
 	return;
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: cgit suggestion
  2009-09-27 19:02 ` cgit suggestion Alexey Nezhdanov
@ 2009-10-16  0:13   ` Lars Hjemli
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Hjemli @ 2009-10-16  0:13 UTC (permalink / raw)
  To: Alexey Nezhdanov; +Cc: git

[* Sorry for the late reply *]

On Sun, Sep 27, 2009 at 21:02, Alexey Nezhdanov <snakeru@gmail.com> wrote:
> Here is the diff. It adds feature of downloading 'named' tarball from the tag
> description page.

Thanks, I've applied the patch (slightly modified) to my master branch
and pushed the result to http://hjemli.net/git/cgit.

--
larsh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-16  0:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <e95c2db40909252314t12abb6e2w9b6e9c34c7a724a5@mail.gmail.com>
2009-09-27 19:02 ` cgit suggestion Alexey Nezhdanov
2009-10-16  0:13   ` Lars Hjemli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).