godotengine / godotengine/godot-git-plugin
Generated .gitattributes are inconsistent
- Dominant language
- C++
- Stars
- 954
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
## Introduction
The Godot Git Plugin creates a pre-filled `.gitattributes` file, if none was found in the project repository.
When no Plugin is installed, the main Godot Engine provides a similar utility via `Version Control -> Create Version Control Metadata`.
## Expected behavior
Both `.gitignore` and `.gitattributes` are the same - independent of the way they were generated.
## Actual behavior
`.gitignore` looks the same using both ways ✔️
`.gitattributes` yields different outputs depending on the selected generation method ❌
More details
The main Godot Engine yields
```
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
```
as defined in [Line 421 of `editor_vcs_interface.cpp`](https://github.com/godotengine/godot/blob/6bca6beea3e1212ad1eb22ffe8630ea25c7e92c2/editor/editor_vcs_interface.cpp#L421) two years ago.
The Godot Git Plugin yields
```
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.cpp text
*.c text
*.h text
*.gd text
*.cs text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
```
as defined in [Line 198 of `git_plugin.cpp`](https://github.com/godotengine/godot-git-plugin/blob/3c50df7af0ccedcb165432d63436290356cf74b2/godot-git-plugin/src/git_plugin.cpp#L198) four years ago.
## Steps forward
```[tasklist]
### Tasks
- [ ] Decide on the proper content of `.gitattributes`
- [ ] Implement it in both the Godot Git Plugin and the Godot Engine
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.