[PR #147] [MERGED] fix bug when get tag id #146

Closed
opened 2026-02-16 10:24:15 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/git/pull/147
Author: @lunny
Created: 3/1/2019
Status: Merged
Merged: 3/1/2019
Merged by: @lunny

Base: masterHead: lunny/fix_get_tag_commit_id


📝 Commits (3)

  • c14cb50 fix bug when get tag id
  • fb7d134 fix wrong test
  • fa27770 use GetTagCommitID on getTag but not git command

📊 Changes

3 files changed (+24 additions, -4 deletions)

View changed files

📝 repo_commit.go (+8 -1)
📝 repo_tag.go (+2 -2)
📝 repo_tag_test.go (+14 -1)

📄 Description

This will fix https://github.com/go-gitea/gitea/issues/5585

It seems

git show-ref --tags <tag>

will not give the right commit id of this tag, but

git rev-list -n 1 $TAG

will return the right commit id.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/git/pull/147 **Author:** [@lunny](https://github.com/lunny) **Created:** 3/1/2019 **Status:** ✅ Merged **Merged:** 3/1/2019 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `lunny/fix_get_tag_commit_id` --- ### 📝 Commits (3) - [`c14cb50`](https://github.com/go-gitea/git/commit/c14cb50968ad3739d8cd4d21f8a042a59e5bdcf9) fix bug when get tag id - [`fb7d134`](https://github.com/go-gitea/git/commit/fb7d13455ac58b27f5f2eb118e34e91559bd34f1) fix wrong test - [`fa27770`](https://github.com/go-gitea/git/commit/fa2777020839a35d02643427afaf266889020090) use GetTagCommitID on getTag but not git command ### 📊 Changes **3 files changed** (+24 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `repo_commit.go` (+8 -1) 📝 `repo_tag.go` (+2 -2) 📝 `repo_tag_test.go` (+14 -1) </details> ### 📄 Description This will fix https://github.com/go-gitea/gitea/issues/5585 It seems ``` git show-ref --tags <tag> ``` will not give the right commit id of this tag, but ``` git rev-list -n 1 $TAG ``` will return the right commit id. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:24:15 -05:00
yindo closed this issue 2026-02-16 10:24:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: go-gitea/git#146