List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: Display of directories that contain only one subdirectory
Date: Sun, 7 Aug 2016 16:09:43 +0100	[thread overview]
Message-ID: <20160807150943.outbmcjqodr2evnd@john.keeping.me.uk> (raw)
In-Reply-To: <20160713224306.GA4187@neptune>

On Wed, Jul 13, 2016 at 06:43:06PM -0400, Jamie Couture wrote:
> So what I was initially wasting my time worrying about was an insane situation 
> where there are many empty directories with only one file at the end of the 
> tunnel.
> 
> mkdir -p why/would/anyone/do/this/what/possible/reason/would/justify/such/a/deep/structure/with/nothing/of/value/come/on
> touch why/would/anyone/do/this/what/possible/reason/would/justify/such/a/deep/structure/with/nothing/of/value/come/on/hi.txt
> 
> Where we might end up with something that does not word wrap, but our css does 
> take care of it: so moot point.  The other consideration I was worrying about 
> was skipping all the in-between folders since there's nothing of value, 
> display some ellipsis:
> 
> some / path / ... / end 
> 
> I'm not sure if there's much value in truncating that scenario.

(I finally have some time to look at this again.)

I don't think it's worth the extra complexity to handle putting in
ellipses for this case.  I tried a long path with a very narrow browser
window and it wraps sensibly, which I think is acceptable.

Note that the patch here won't display the file at the end of your
second example above - it explicitly checks for directories, which is a
conscious choice so that we don't have to go back and correct the mode
bits in the first column.


  reply	other threads:[~2016-08-07 15:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 17:57 erik.brangs
2016-07-13 19:49 ` john
2016-07-13 22:12   ` jamie.couture
2016-07-13 22:43     ` jamie.couture
2016-08-07 15:09       ` john [this message]
2016-07-14 18:12   ` erik.brangs
2016-08-07 15:12     ` john
2016-08-08 22:48       ` Jason

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=20160807150943.outbmcjqodr2evnd@john.keeping.me.uk \
    --to=cgit@lists.zx2c4.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 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).