Pushing to a ref directly causes an error message #739

Closed
opened 2025-11-02 03:34:36 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @evilstiefel on GitHub (May 24, 2017).

  • Gitea version (or commit ref): 1.1.1+2-g2854c8aa
  • Git version: 2.8.5
  • Operating system: Ubuntu
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When pushing a (new) ref directly (e.g. git push develop:refs/wip/develop), some hook in Gitea fails to process it properly (possibly because it's assumed to be a branch name directly). You get an error-message while pushing:

git push origin develop:refs/wip/develop
Total 0 (delta 0), reused 0 (delta 0)
remote: 2017/05/24 11:57:17 [...tea/models/update.go:147 PushUpdate()] [E] GetBranchCommitID[refs/wip/develop]: object does not exist [id: refs/heads/refs/wip/develop, rel_path: ]
To ssh://*snip*/*snip*/*snip*.git
 * [new branch]      develop -> refs/wip/develop

Git itself doesn't care and the push is successful, I am unsure about the side effects within Gitea's web-interface though.

Originally created by @evilstiefel on GitHub (May 24, 2017). - Gitea version (or commit ref): 1.1.1+2-g2854c8aa - Git version: 2.8.5 - Operating system: Ubuntu - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant ## Description When pushing a (new) ref directly (e.g. git push develop:refs/wip/develop), some hook in Gitea fails to process it properly (possibly because it's assumed to be a branch name directly). You get an error-message while pushing: ``` git push origin develop:refs/wip/develop Total 0 (delta 0), reused 0 (delta 0) remote: 2017/05/24 11:57:17 [...tea/models/update.go:147 PushUpdate()] [E] GetBranchCommitID[refs/wip/develop]: object does not exist [id: refs/heads/refs/wip/develop, rel_path: ] To ssh://*snip*/*snip*/*snip*.git * [new branch] develop -> refs/wip/develop ``` Git itself doesn't care and the push is successful, I am unsure about the side effects within Gitea's web-interface though.
GiteaMirror added the type/bug label 2025-11-02 03:34:36 -06:00
Author
Owner

@lunny commented on GitHub (Dec 11, 2018):

I tested currently master. Both https and ssh are OK. Closed now and feel free to reopen it.

@lunny commented on GitHub (Dec 11, 2018): I tested currently master. Both https and ssh are OK. Closed now and feel free to reopen it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#739