Skip to content

Cloning creates empty repositories #10143

@jimparis

Description

@jimparis
  • Gitea version (or commit ref): 1.11.0+rc2-17-g0129e76ef
  • Git version: 2.20.1
  • Operating system: Debian
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No ("Push to create is not enabled for users." and "Push to create is not enabled for organizations.")
    • Not relevant
  • Log gist:

Description

With ENABLE_PUSH_CREATE_USER, it's not just pushing -- even cloning a nonexistent repository will create it:

$ git clone [email protected]:jim/did-not-exist
Cloning into 'did-not-exist'...
warning: You appear to have cloned an empty repository.

image

That ends up being really inconvenient, because a typo means you're creating empty repositories instead of getting a useful error.

It seems like this was maybe the subject of #9797? But as far as I can tell that patch should already be included in the build I'm running.

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