Commit hashes not parsed / linked in issue comments #841

Closed
opened 2025-11-02 03:38:39 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @IzzySoft on GitHub (Jun 24, 2017).

  • Gitea version (or commit ref): 1.1.2
  • Git version: 2.1.4
  • Operating system: Bananian (Debian Jessie, ARM)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When referencing commit hashes within issue comments, they are never linked to the corresponding commit – whether separate on a line or enclosed by text (yes, I saw #1667), whether shortened to 7, 10 or not at all (in which case the parser shortens the string, but doesn't link it) – no link.

Of course the corresponding commits exist in the very same project, so it's not that there'd be no target. As the linking does work on try.gitea.io it seems that either something must be missing with my installation (single-binary drop-in: gitea-1.1.2-linux-arm-7), or this is a bug specific to the ARM build.

Example

For this input:

foo

5c5c946673 

bar 5c5c946673ebd1fdcc996a5a198699b4e3ace9b4

Result is rendered like this:

<div class="ui bottom attached tab segment markdown active" data-tab="preview"><p>foo</p>

  <p>5c5c946673</p>

  <p>bar 5c5c94667</p>
</div>

The last line suggests Gitea did recognize it as hash, as otherwise I don't see why it got shortend.

Originally created by @IzzySoft on GitHub (Jun 24, 2017). - Gitea version (or commit ref): 1.1.2 - Git version: 2.1.4 - Operating system: Bananian (Debian Jessie, ARM) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description When referencing commit hashes within issue comments, they are never linked to the corresponding commit – whether separate on a line or enclosed by text (yes, I saw #1667), whether shortened to 7, 10 or not at all (in which case the parser *shortens the string,* but doesn't link it) – no link. Of course the corresponding commits exist in the very same project, so it's not that there'd be no target. As the linking does work on try.gitea.io it seems that either something must be missing with my installation (single-binary drop-in: `gitea-1.1.2-linux-arm-7`), or this is a bug specific to the ARM build. ## Example For this input: foo 5c5c946673 bar 5c5c946673ebd1fdcc996a5a198699b4e3ace9b4 Result is rendered like this: <div class="ui bottom attached tab segment markdown active" data-tab="preview"><p>foo</p> <p>5c5c946673</p> <p>bar 5c5c94667</p> </div> The last line suggests Gitea *did* recognize it as hash, as otherwise I don't see why it got shortend.
GiteaMirror added the type/bug label 2025-11-02 03:38:39 -06:00
Author
Owner

@IzzySoft commented on GitHub (Aug 10, 2017):

Just updated to the fresh new 1.1.3 and wonder: does the milestone 1.2.0 mean the fix won't be included before that? As the issue still persists with v1.1.3. Same for #1541 (which was marked fixed even before v1.1.2 was released).

@IzzySoft commented on GitHub (Aug 10, 2017): Just updated to the fresh new 1.1.3 and wonder: does the milestone 1.2.0 mean the fix won't be included before that? As the issue still persists with v1.1.3. Same for #1541 (which was marked fixed even before v1.1.2 was released).
Author
Owner

@lunny commented on GitHub (Aug 10, 2017):

Yes, these two PR haven't be backported to v1.1.3. But maybe we can backported it to v1.1.4.

@lunny commented on GitHub (Aug 10, 2017): Yes, these two PR haven't be backported to v1.1.3. But maybe we can backported it to v1.1.4.
Author
Owner

@IzzySoft commented on GitHub (Aug 11, 2017):

No deal-breaker, I just tried to understand. But of course, the sooner the better 😉

@IzzySoft commented on GitHub (Aug 11, 2017): No deal-breaker, I just tried to understand. But of course, the sooner the better :wink:
Author
Owner

@lunny commented on GitHub (Aug 11, 2017):

@IzzySoft #2291 and #2293 both are backported to v1.1.4

@lunny commented on GitHub (Aug 11, 2017): @IzzySoft #2291 and #2293 both are backported to v1.1.4
Author
Owner

@IzzySoft commented on GitHub (Aug 11, 2017):

@lunny Thanks a lot!

@IzzySoft commented on GitHub (Aug 11, 2017): @lunny Thanks a lot!
Author
Owner

@IzzySoft commented on GitHub (Aug 29, 2017):

Yes! Working in v1.2 – thanks again!

@IzzySoft commented on GitHub (Aug 29, 2017): Yes! Working in v1.2 – thanks again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#841