Skip to content

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

Closed
@7FM

Description

@7FM
  • 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.

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