Git attributes and Mercurial attributes
Georges Racinet
georges.racinet at cloudcrane.io
Fri Apr 12 13:20:47 UTC 2024
Dear Mercurial users,
(as a reminder, I am the maintainer of Heptapod, the DevOps platform
based on GitLab that supports Mercurial).
The Git world has a conventional potentially checked-in `.gitattributes`
file, which allows to tweak some behaviour in a shared way. It is
implemented in the standard `git` command [1]. For instance, in GitLab,
it can be used to teach the programmings language detection about the
file extensions that you are actually using.
I've been postponing its implementation in HGitaly, Heptapod's Mercurial
backend, because up to now the main application was simply ignoring it
if not implemented. However, this has changed recently, and to put it
short, another useful user feature [1] depends on it, hence I'm about to
do it.
For various reasons, Heptapod will have to take files named
`.gitattributes` into account, but it would be unnatural indeed if that
was the only option, so I'm willing to introduce a `.hgattributes`
alongside. But that is setting a precedent.
Now my questions :
- is there any other existing similar convention in the Mercurial world ?
- any suggestions about the actual file name
I can start with just `.gitattributes`, but I am willing to release the
feature with Heptapod 1.5, that should happen around the end of April.
Best,
[1] see `man gitattributes` and `man git-check-attr`
[2] the feature in question is the automatic folding of generated code
in diff views.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xB8EB20361976F291.asc
Type: application/pgp-keys
Size: 677 bytes
Desc: OpenPGP public key
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20240412/854d9634/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20240412/854d9634/attachment.asc>
More information about the Mercurial
mailing list