Skip to content

working-tree-encoding #231

@TheJP

Description

@TheJP

Description

I've noticed, that the working-tree-encoding feature is not supported in jgit. Are there already plans to implement this? And would that feature be welcome or is it out-of-scope for JGit?

Alternative Git implementations (e.g. JGit or libgit2) and older Git versions (as of March 2018) do not support the working-tree-encoding attribute.

https://git-scm.com/docs/gitattributes#_working_tree_encoding

Motivation

We have a repository where some files are stored as utf-8 in the index, but checked out with a different encoding. This makes files work nicely with git tools (git diff, gitlab, ...) while being in the correct (required) encoding when working with the files locally.

We have some developers that would like to use eclipse git tooling. When they check out files in eclipse that have a working-tree-encoding attribute set, the attribute is ignored and the files get checked out as utf-8 files.

Alternatives considered

  • Changing the encoding of all files to utf-8 was attempted, but is not possible for this project.
  • Not using the attribute is possible, but leads to a worse developer experience for the people not using eclipse.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions