Browsing to an uninitialized repository results in "System Notice" about editorconfig #3823

Closed
opened 2025-11-02 05:26:33 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @ghost on GitHub (Aug 22, 2019).

  • Gitea version (or commit ref): 1.9.1
  • Git version: 2.20
  • Operating system: Debian buster
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (as it requires admin rights to view system notices)
    • Not relevant
  • Log gist:

Description

  1. I have a repository that is not initialized
  2. When I browse to it in the Web UI it shows the page about being not initialized
  3. This is causing a "System Notice" about editorconfig to occur in the admin panel (I believe this is a bug)
Error while getting .editorconfig file: reference not found...
Originally created by @ghost on GitHub (Aug 22, 2019). - Gitea version (or commit ref): 1.9.1 - Git version: 2.20 - Operating system: Debian buster - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No (as it requires admin rights to view system notices) - [ ] Not relevant - Log gist: ## Description 1. I have a repository that is not initialized 2. When I browse to it in the Web UI it shows the page about being not initialized 3. This is causing a "System Notice" about editorconfig to occur in the admin panel (I believe this is a bug) ``` Error while getting .editorconfig file: reference not found... ```
GiteaMirror added the type/bug label 2025-11-02 05:26:33 -06:00
Author
Owner

@lunny commented on GitHub (Aug 23, 2019):

related with #7938

@lunny commented on GitHub (Aug 23, 2019): related with #7938
Author
Owner

@mrsdizzie commented on GitHub (Aug 26, 2019):

#6478 is the commit that caused this to start happening, but the system warning code has been in middleware for years now.

What happenes in #6478 is that it changes the error in ctx.Repo.GetEditorconfig() here:

042089fbaf/routers/repo/middlewares.go (L13-L21)

From: object does not exist [id: refs/heads/master, rel_path: ]

To: reference not found

Which then trips the !git.IsErrNotExist(err) check:

042089fbaf/modules/git/error.go (L33-L41)

I'm not sure if IsErrNotExist needs to be updated here as I'm not familiar with all the git plumbing code.

Separate from that, not really sure this needs to be a system notice either -- but it has been like that for years now and only recently is this check failing. Perhaps @filipnavara has more insight to the error change as they authored the commit where this started.

@mrsdizzie commented on GitHub (Aug 26, 2019): #6478 is the commit that caused this to start happening, but the system warning code has been in middleware for years now. What happenes in #6478 is that it changes the error in ctx.Repo.GetEditorconfig() here: https://github.com/go-gitea/gitea/blob/042089fbaf8a818042405a75bee08dea8db347c0/routers/repo/middlewares.go#L13-L21 From: ```object does not exist [id: refs/heads/master, rel_path: ] ``` To: ```reference not found ``` Which then trips the !git.IsErrNotExist(err) check: https://github.com/go-gitea/gitea/blob/042089fbaf8a818042405a75bee08dea8db347c0/modules/git/error.go#L33-L41 I'm not sure if IsErrNotExist needs to be updated here as I'm not familiar with all the git plumbing code. Separate from that, not really sure this needs to be a system notice either -- but it has been like that for years now and only recently is this check failing. Perhaps @filipnavara has more insight to the error change as they authored the commit where this started.
Author
Owner

@stale[bot] commented on GitHub (Oct 28, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Oct 28, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@ghost commented on GitHub (Oct 28, 2019):

This is still opened, until something changes you'll continue to see potentially confusing/untrackable System Notices about this

@ghost commented on GitHub (Oct 28, 2019): This is still opened, until something changes you'll continue to see potentially confusing/untrackable System Notices about this
Author
Owner

@WozSoftware commented on GitHub (Nov 15, 2019):

Just installed 1.9.6 with MSSql and can confirm get the same issue

@WozSoftware commented on GitHub (Nov 15, 2019): Just installed 1.9.6 with MSSql and can confirm get the same issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3823