List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] Added trailing slash to directories
@ 2011-11-04 22:50 ape
  2012-01-14 16:26 ` ape
  0 siblings, 1 reply; 3+ messages in thread
From: ape @ 2011-11-04 22:50 UTC (permalink / raw)


Hello!

I think the directories in the tree view are not clearly distinguishable 
from other files. I added a trailing slash to the directories and now 
they look a lot better.

We could also sort the folders to the top of the list. This, however, is 
not included in this patch.

 From 71a0620110c505b6806119a9e32e6a6343edbffc Mon Sep 17 00:00:00 2001
From: Lauri Niskanen <ape at ape3000.com>
Date: Sat, 5 Nov 2011 00:41:39 +0200
Subject: [PATCH] Added trailing slash to directories

- This only affects the tree view
---
  ui-tree.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ui-tree.c b/ui-tree.c
index 442b6be..6428fec 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -158,6 +158,7 @@ static int ls_item(const unsigned char *sha1, const 
char *base, int baselen,
                 html_txt(name);
                 html("</a>");
         } else if (S_ISDIR(mode)) {
+               name = strcat(name, "/");
                 cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
                                curr_rev, fullpath);
         } else {
-- 
1.7.7.2

-- 
Ape <Lauri Niskanen>




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

* [PATCH] Added trailing slash to directories
  2011-11-04 22:50 [PATCH] Added trailing slash to directories ape
@ 2012-01-14 16:26 ` ape
  2012-01-14 21:33   ` cgit
  0 siblings, 1 reply; 3+ messages in thread
From: ape @ 2012-01-14 16:26 UTC (permalink / raw)


On 05/11/11 00:50, Lauri Niskanen wrote:
> Hello!
>
> I think the directories in the tree view are not clearly distinguishable
> from other files. I added a trailing slash to the directories and now
> they look a lot better.
>
> We could also sort the folders to the top of the list. This, however, is
> not included in this patch.
>
>  From 71a0620110c505b6806119a9e32e6a6343edbffc Mon Sep 17 00:00:00 2001
> From: Lauri Niskanen <ape at ape3000.com>
> Date: Sat, 5 Nov 2011 00:41:39 +0200
> Subject: [PATCH] Added trailing slash to directories
>
> - This only affects the tree view
> ---
> ui-tree.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/ui-tree.c b/ui-tree.c
> index 442b6be..6428fec 100644
> --- a/ui-tree.c
> +++ b/ui-tree.c
> @@ -158,6 +158,7 @@ static int ls_item(const unsigned char *sha1, const
> char *base, int baselen,
> html_txt(name);
> html("</a>");
> } else if (S_ISDIR(mode)) {
> + name = strcat(name, "/");
> cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
> curr_rev, fullpath);
> } else {

Does anybody have any comments about this patch?

-- 
Ape <Lauri Niskanen>




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

* [PATCH] Added trailing slash to directories
  2012-01-14 16:26 ` ape
@ 2012-01-14 21:33   ` cgit
  0 siblings, 0 replies; 3+ messages in thread
From: cgit @ 2012-01-14 21:33 UTC (permalink / raw)


On Sat, Jan 14, 2012 at 06:26:27PM +0200, Lauri Niskanen wrote:
> On 05/11/11 00:50, Lauri Niskanen wrote:
> >Hello!
> >
> >I think the directories in the tree view are not clearly distinguishable
> >from other files. I added a trailing slash to the directories and now
> >they look a lot better.
> >
> >We could also sort the folders to the top of the list. This, however, is
> >not included in this patch.
> >
> > From 71a0620110c505b6806119a9e32e6a6343edbffc Mon Sep 17 00:00:00 2001
> >From: Lauri Niskanen <ape at ape3000.com>
> >Date: Sat, 5 Nov 2011 00:41:39 +0200
> >Subject: [PATCH] Added trailing slash to directories
> >
> >- This only affects the tree view
> >---
> >ui-tree.c | 1 +
> >1 files changed, 1 insertions(+), 0 deletions(-)
> >
> >diff --git a/ui-tree.c b/ui-tree.c
> >index 442b6be..6428fec 100644
> >--- a/ui-tree.c
> >+++ b/ui-tree.c
> >@@ -158,6 +158,7 @@ static int ls_item(const unsigned char *sha1, const
> >char *base, int baselen,
> >html_txt(name);
> >html("</a>");
> >} else if (S_ISDIR(mode)) {
> >+ name = strcat(name, "/");
> >cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
> >curr_rev, fullpath);
> >} else {
> 
> Does anybody have any comments about this patch?

Both of your patches basically look fine to me. They seem to be broken
due to your MUA converting spaces into tabs though:

    $ git am -s foo.patch
    Applying: Added trailing slash to directories
    fatal: corrupt patch at line 10
    Patch failed at 0001 Added trailing slash to directories
    When you have resolved this problem run "git am --resolved".
    If you would prefer to skip this patch, instead run "git am --skip".
    To restore the original branch and stop patching run "git am --abort".

I'd really advise you to have a look at git-send-email(1). Just add
proper configuration settings for that and resubmit your patches using
`git send-email HEAD~2` (add "--annotate" to add annotations and/or
review your patches once more before submission).

> 
> -- 
> Ape <Lauri Niskanen>
> 
> _______________________________________________
> cgit mailing list
> cgit at hjemli.net
> http://hjemli.net/mailman/listinfo/cgit




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

end of thread, other threads:[~2012-01-14 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-04 22:50 [PATCH] Added trailing slash to directories ape
2012-01-14 16:26 ` ape
2012-01-14 21:33   ` cgit

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).