git - file types / metadata

From: Kevin Swinton <hidden>
Date: 2020-02-21 08:39:48

Hi

Currently converting git (using libgit2) to run on the RISC OS
operating system. There's one specific requirement this OS provides
that, after discussion with the libgit2 folk, I'd be grateful for your
expertise and experience on:

The RISC OS filesystem is not Unix-like. It doesn't use file
extensions like ".txt", but instead associates a 12-bit file type with
each file, to identify what sort of file it is (e.g. 0xfff=text file)

So the filemode value in a tree entry doesn't really apply. I can see
libgit2 uses a uint16_t to store this, and it appears to be written
into the object database in text form, so for a normal file in a tree
object, if I dump it on-screen I see this ASCII sequence: 100644.

Here's the thought: could git introduce some form of "custom" filemode
identifier? For example, a value of 017xxxx could be used to indicate
to git that it's to be treated the same as 0100644, but that those
bottom 12 bits of the filemode could be interpreted differently (in
this case with RISC OS it would actually provide exactly what's
needed).

(Feedback from libgit2 folk is that in future some kind of file
metadata ability - more general than this - could have other uses.)

Any thoughts/feedback/clarity on git policy, appreciated

regards

Kevin Swinton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help