Discussion:
[Trac-dev] [git] git_fs_encoding
RjOllos
2017-06-05 17:11:08 UTC
Permalink
I've been unable to find any Git documentation that indicates how the
filesystem encoding would be configured for a Git repository. In Trac we
have the [git] git_fs_encoding, so presumably there is a way to configure
it in the repository. The only thing close that I've found is an encoding
setting for commit messages:
https://git-scm.com/docs/git-config#git-config-i18ncommitEncoding

Does anyone know?

thanks.
- Ryan
--
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+***@googlegroups.com.
To post to this group, send email to trac-***@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.
Emerson CastaƱeda
2017-06-05 18:28:53 UTC
Permalink
Hi Ryan

It depends what you are looking for.

In my understanding git does not touch your encoding, it has his own system
to store objects.

On the other hand, GIT lets you manipulate the encoding for your commit
messages and the encoding to interact with your GUI tool.
*Git is to some extent character encoding agnostic.*
*The contents of the blob objects are uninterpreted sequences of bytes.
There is no encoding translation at the core level.*
*Path names are encoded in UTF-8 normalization form C. This applies to
tree objects, the index file, ref names, as well as path names in command
line arguments, environment variables and config files (.git/config (see
git-config[1] <https://git-scm.com/docs/git-config>), gitignore[5]
<https://git-scm.com/docs/gitignore>, gitattributes[5]
<https://git-scm.com/docs/gitattributes> and gitmodules[5]
<https://git-scm.com/docs/gitmodules>).*
*Note that Git at the core level treats path names simply as sequences of
non-NUL bytes, there are no path name encoding conversions (except on Mac
and Windows). Therefore, using non-ASCII path names will mostly work even
on platforms and file systems that use legacy extended ASCII encodings.
However, repositories created on such systems will not work properly on
UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
Additionally, many Git-based tools simply assume path names to be UTF-8 and
will fail to display other encodings correctly.*
The previous text is one of the best summaries you can find about the
topic, directly in GIT documentation (1).

This is other interesting reflection about the subject (2)


Refs:

(1) https://git-scm.com/docs/git-commit#_discussion
(2)
https://stackoverflow.com/questions/10623498/what-can-cause-git-to-mess-with-character-encoding
I've been unable to find any Git documentation that indicates how the
filesystem encoding would be configured for a Git repository. In Trac we
have the [git] git_fs_encoding, so presumably there is a way to configure
it in the repository. The only thing close that I've found is an encoding
https://git-scm.com/docs/git-config#git-config-i18ncommitEncoding
Does anyone know?
thanks.
- Ryan
--
You received this message because you are subscribed to the Google Groups
"Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+***@googlegroups.com.
To post to this group, send email to trac-***@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.
Loading...