~sircmpwn/sr.ht-discuss

7 6

misleading/incorrect file mode permissions in tree view

Details
Message ID
<87pm9ca5rb.fsf@hagelb.org>
DKIM signature
missing
Download raw message
In the tree view for git.sr.ht, it lists out permissions for each file
in the style of "-rw-r--r--", for example on this page:

  https://git.sr.ht/~sircmpwn/git.sr.ht/tree

On a narrow screen, this can consume up to a third of the width of the
page, leading to a comical situation where only five characters of the
filename are visible and the rest is truncated:

  https://p.hagelb.org/git-permissions-lol.png

But it's more than just a design gaffe; it's actually misleading
data. In reality, git does not track file permissions at all beyond a
single executable bit, so claiming that a file in git has permissions
of "-rw-r--r--" is misleading and/or incorrect:

  https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/ContentLimitations.html

This display should be changed so it focuses on relevant information.

-Phil
Details
Message ID
<CR5Z1SMOWE82.2VNY0W8RGKUU5@taiga>
In-Reply-To
<87pm9ca5rb.fsf@hagelb.org> (view parent)
DKIM signature
missing
Download raw message
I am aware of the limitations of git and we chose to display it in the
familiar Unix style regardless; these modes match the modes you will get
should you clone the repository regardless.
Daniel Gröber <dxld@darkboxed.org>
Details
Message ID
<20230314085007.emhh4olnrrc4t4h5@House.clients.dxld.at>
In-Reply-To
<CR5Z1SMOWE82.2VNY0W8RGKUU5@taiga> (view parent)
DKIM signature
missing
Download raw message
Hi Drew,

On Tue, Mar 14, 2023 at 09:43:23AM +0100, Drew DeVault wrote:
> I am aware of the limitations of git and we chose to display it in the
> familiar Unix style regardless; these modes match the modes you will get
> should you clone the repository regardless.

Is that actually true though? The permissions you end up with certainly
depend on the umask which is local policy so this really is just
a misleading waste of space.

Setting the umask to `077` for example will result in -rw------ :)

--Daniel
Details
Message ID
<CR5Z8EC8GTHT.2673OCEWRCLNW@taiga>
In-Reply-To
<20230314085007.emhh4olnrrc4t4h5@House.clients.dxld.at> (view parent)
DKIM signature
missing
Download raw message
True. But most people don't grok the umask and it's usually set to the
default :)
Details
Message ID
<a299c92b-bda1-4294-be42-4e3ab4a4f5c3@hanna.lol>
In-Reply-To
<20230314085007.emhh4olnrrc4t4h5@House.clients.dxld.at> (view parent)
DKIM signature
missing
Download raw message
> Is that actually true though? The permissions you end up with certainly
> depend on the umask which is local policy so this really is just
> a misleading waste of space.

If you set the umask sure, but by default yes the permissions you get 
will be the ones viewed on the page. I guarantee you 90% of users won't 
even touch umasks or have a need to.
Details
Message ID
<87wn3j4hg7.fsf@remworks.net>
In-Reply-To
<CR5Z1SMOWE82.2VNY0W8RGKUU5@taiga> (view parent)
DKIM signature
missing
Download raw message
Why not go for drwx?  Seems familiar enough, makes clear distinction
between [d]irectory and e[x]ecutable and takes up less space.

Other option, don't show the "file permissions" column when screen is
not wide enough using a css media selector.  The information is still
available on the file detail page.
Details
Message ID
<87mt4f9vz9.fsf@hagelb.org>
In-Reply-To
<CR5Z1SMOWE82.2VNY0W8RGKUU5@taiga> (view parent)
DKIM signature
missing
Download raw message
Drew DeVault <sir@cmpwn.com> writes:

> I am aware of the limitations of git and we chose to display it in the
> familiar Unix style regardless; these modes match the modes you will get
> should you clone the repository regardless.

OK, fair enough, it's your site.

But for clarification, are you saying it's intentional (or acceptable)
that the one single bit of permissions data is displayed using 9 columns
and the whole filename only gets 5?

>>  https://p.hagelb.org/git-permissions-lol.png

-Phil
Details
Message ID
<20230314193902.drqn4r7vm2gsnvrx@mithlond.localdomain>
In-Reply-To
<87wn3j4hg7.fsf@remworks.net> (view parent)
DKIM signature
missing
Download raw message
On 23/03/14 01:59PM, Remco van 't Veer wrote:
> Other option, don't show the "file permissions" column when screen is
> not wide enough using a css media selector.  The information is still
> available on the file detail page.

There are at least two more options when it comes to displaying the tree view 
on small browser widths (mobile):

- Scroll the table/table wrapper (I am doing that for tables, pre figures... on 
  my website[1])

- Break the table into block-like display using CSS, so long fields like 
  permissions take up the whole line, filename takes the next whole line, etc.

[1]: https://git.sr.ht/~strahinja/strahinja-org-slw/tree/master/item/css/style.css#L80
Reply to thread Export thread (mbox)