All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Nezhdanov <snakeru@gmail.com>
To: hjemli@gmail.com
Cc: git@vger.kernel.org
Subject: Re: cgit suggestion
Date: Sun, 27 Sep 2009 23:02:30 +0400	[thread overview]
Message-ID: <200909272302.30742.snakeru@gmail.com> (raw)
In-Reply-To: <e95c2db40909252314t12abb6e2w9b6e9c34c7a724a5@mail.gmail.com>

[-- 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


       reply	other threads:[~2009-09-27 19:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e95c2db40909252314t12abb6e2w9b6e9c34c7a724a5@mail.gmail.com>
2009-09-27 19:02 ` Alexey Nezhdanov [this message]
2009-10-16  0:13   ` cgit suggestion Lars Hjemli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909272302.30742.snakeru@gmail.com \
    --to=snakeru@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hjemli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.