Migrated local repository without master branch is shown as if empty #4165

Closed
opened 2025-11-02 05:40:54 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @7FM on GitHub (Oct 22, 2019).

  • Gitea version (or commit ref): 1.9.4 built with GNU Make 4.1, go1.12.10 : bindata, sqlite, sqlite_unlock_notif
  • Git version: 2.20.1
  • 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 because there are no local repositories and apparently this does not occurr when migration a url based repository
    • Not relevant
  • Log gist:

Description

How to reproduce: (ssh on server running gitea)

  1. mkdir test.git
  2. cd test.git
  3. git --bare init
  4. cd ..
  5. git clone test.git/
  6. cd test
  7. echo 'dummy text' > README.md
  8. git add README.md
  9. git commit -m "dummy"
    // Make sure we do not have a master branch but stil a not empty repo
  10. git push origin master:not_master
  11. test/ is no more needed
    // Remember the path of test.git
  12. cd test.git && pwd
  13. make sure test.git is readable by the gitea instance
  14. open gitea website with an arbitrary user and migrate the local repository with the remembered path

==> After importing the repository is shown as if just newly created without any content
Expected: show branch not_master with content

The migration itself seems to work: if you clone this repository afterwards the branch not_master exists with the correct content

After a new push this issue gets resolved and the repository is visualized correctly.
This does not occurr with local repositories having a master branch with content.

Restarting the gitea service does not help.
Logging out and in again neither.

Originally created by @7FM on GitHub (Oct 22, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.9.4 built with GNU Make 4.1, go1.12.10 : bindata, sqlite, sqlite_unlock_notif - Git version: 2.20.1 - Operating system: Debian Buster - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No because there are no local repositories and apparently this does not occurr when migration a url based repository - [ ] Not relevant - Log gist: ## Description **How to reproduce: (ssh on server running gitea)** 1. mkdir test.git 2. cd test.git 3. git --bare init 4. cd .. 5. git clone test.git/ 6. cd test 7. echo 'dummy text' > README.md 8. git add README.md 9. git commit -m "dummy" // Make sure we do not have a master branch but stil a not empty repo 10. git push origin **master:not_master** 11. test/ is no more needed // Remember the path of test.git 12. cd test.git && pwd 13. make sure test.git is readable by the gitea instance 14. open gitea website with an arbitrary user and migrate the local repository with the remembered path ==> After importing the repository is shown as if just newly created without any content Expected: show branch not_master with content The migration itself seems to work: if you clone this repository afterwards the branch not_master exists with the correct content After a new push this issue gets resolved and the repository is visualized correctly. This does not occurr with local repositories having a master branch with content. Restarting the gitea service does not help. Logging out and in again neither.
Author
Owner

@zeripath commented on GitHub (Oct 22, 2019):

I definitely remember fixing this.

I'm fairly certain that fix is in 1.10

@zeripath commented on GitHub (Oct 22, 2019): I definitely remember fixing this. I'm fairly certain that fix is in 1.10
Author
Owner

@zeripath commented on GitHub (Oct 22, 2019):

Fixed by #7610

@zeripath commented on GitHub (Oct 22, 2019): Fixed by #7610
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4165