Skip to content

Tabsize and tab support with editorconfig inside branch not working #27413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tkuschel opened this issue Oct 3, 2023 · 0 comments
Open

Tabsize and tab support with editorconfig inside branch not working #27413

tkuschel opened this issue Oct 3, 2023 · 0 comments
Labels

Comments

@tkuschel
Copy link

tkuschel commented Oct 3, 2023

Description

gitea version 1.20.4 (my installed version at git.kuschel.at)
gitea version 1.22.0+dev-95-gcc5df2668 (try.gitea.io)

Reproduce the issue:

  1. Create a new repository, eg. "editorconfig"
  2. Create a test file with tabsize = 2 (spaces), i.e.
    indent_style = tab, and indent_size = 2.
  3. Commit this file to this repository (default branch),
    and push it to the gitea server.
  4. The uploaded file then resides in main (or master) branch.
  5. Create a new branch e.g. "issue" with "git checkout -b issue"
  6. Now on the branch issue, create the file .editorconfig
# Top-most EditorConfig file
root = true
[*]
indent_style = tab
indent_size = 2
end_of_file = lf
charset = UTF-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
  1. Commit and push this file to the gitea server.

Expected: View of the test_tab2 file (tabsize=2).
Received: The standard view of the gitea server, i.e.
version 1.20.4: tabsize=8
version 1.22.0-dev: tabsize=4 since #26391

  1. This issue also happens with other tab sizes.

Links for testing:

Hint: Changing the default branch to branch "issue"
recognizes the .editorconfig file!
So I think the .editorconfig file is only recognized at the default branch.

Interesting references about this topic: #26391 #24991

I would like to have a configuration option via the GUI that
can be set for the entire repository: indent style, and
indent size, similar to the .editorconfig, but without those conflicts
and knowledgement about the usage of .editorconfig

Gitea Version

1.22.0+dev-95-gcc5df2668 , 1.20.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Database

MySQL/MariaDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant