Creating pull request returns 500 error because of commit symbol #6762

Closed
opened 2025-11-02 07:05:52 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @lakostin on GitHub (Jan 26, 2021).

  • Gitea version (or commit ref):
    1.14.0+dev-534-gedbc5c86d
  • Git version:
    2.26.2
  • Operating system:
    docker Alpine Linux v3.12
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
    2021/01/26 14:11:06 ...ters/repo/compare.go:477:PrepareCompareDiff() [E] GetCommit: encoding/hex: invalid byte: U+004B 'K'

Description

...

Screenshots

Screenshot from 2021-01-26 14-18-12

Originally created by @lakostin on GitHub (Jan 26, 2021). - Gitea version (or commit ref): 1.14.0+dev-534-gedbc5c86d - Git version: 2.26.2 - Operating system: docker Alpine Linux v3.12 - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - Log gist: 2021/01/26 14:11:06 ...ters/repo/compare.go:477:PrepareCompareDiff() [E] GetCommit: encoding/hex: invalid byte: U+004B 'K' ## Description ... ## Screenshots ![Screenshot from 2021-01-26 14-18-12](https://user-images.githubusercontent.com/29179059/105840486-27368a00-5fe4-11eb-98fa-5f9b3fbf5a20.png)
GiteaMirror added the type/bug label 2025-11-02 07:05:52 -06:00
Author
Owner

@lunny commented on GitHub (Jan 26, 2021):

If is this repository a public one?

@lunny commented on GitHub (Jan 26, 2021): If is this repository a public one?
Author
Owner

@lakostin commented on GitHub (Jan 28, 2021):

If is this repository a public one?

private

@lakostin commented on GitHub (Jan 28, 2021): > If is this repository a public one? private
Author
Owner

@zeripath commented on GitHub (Feb 9, 2021):

I bet the issue is that the name of the branch contains exactly 40 characters

@zeripath commented on GitHub (Feb 9, 2021): I bet the issue is that the name of the branch contains exactly 40 characters
Author
Owner

@zeripath commented on GitHub (Feb 10, 2021):

Apologies for this I've predicted this issue for a very long time but haven't told anyone about it or fixed it.

The provided fix is by no means perfect as a branch whose name matches the sha pattern could still collide in interesting and undefined ways and so we will need deeper testing to figure out what we want.

@zeripath commented on GitHub (Feb 10, 2021): Apologies for this I've predicted this issue for a very long time but haven't told anyone about it or fixed it. The provided fix is by no means perfect as a branch whose name matches the sha pattern could still collide in interesting and undefined ways and so we will need deeper testing to figure out what we want.
Author
Owner

@richmahn commented on GitHub (Feb 10, 2021):

@zeripath this is also on the v1.13.3 milestones so needs a backport.

@richmahn commented on GitHub (Feb 10, 2021): @zeripath this is also on the v1.13.3 milestones so needs a backport.
Author
Owner

@zeripath commented on GitHub (Feb 10, 2021):

Feel free to send some of these backports. I don't mind.

Done it now

@zeripath commented on GitHub (Feb 10, 2021): ~~Feel free to send some of these backports. I don't mind.~~ Done it now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6762