[PR #148] [MERGED] Fix for bad commitID to show up in error #148

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/git/pull/148
Author: @richmahn
Created: 3/6/2019
Status: Merged
Merged: 3/8/2019
Merged by: @techknowlogick

Base: masterHead: feature-4762-api-content-create-update-delete


📝 Commits (3)

  • 53bbebf Fix for bad commitID to show up in error
  • 8e5b8f3 Adds test for repo_commit GetCommit
  • 0c7c947 Adds test if commitID is valid branch

📊 Changes

2 files changed (+12 additions, -1 deletions)

View changed files

📝 repo_commit.go (+2 -1)
📝 repo_commit_test.go (+10 -0)

📄 Description

This error message for a bad commitID makes no sense because when the Error object is created, commitID is always empty since NewCommand() call replaced the given commitID. This makes sure we retain the old commitID until after this block.


🔄 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/148 **Author:** [@richmahn](https://github.com/richmahn) **Created:** 3/6/2019 **Status:** ✅ Merged **Merged:** 3/8/2019 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `feature-4762-api-content-create-update-delete` --- ### 📝 Commits (3) - [`53bbebf`](https://github.com/go-gitea/git/commit/53bbebf9aed29bdb76ecb16975cd3a7f681fbf93) Fix for bad commitID to show up in error - [`8e5b8f3`](https://github.com/go-gitea/git/commit/8e5b8f31670f14d20e7d89872b14e03948418f21) Adds test for repo_commit GetCommit - [`0c7c947`](https://github.com/go-gitea/git/commit/0c7c9472a4b395e2415a959f47108a845f4704b8) Adds test if commitID is valid branch ### 📊 Changes **2 files changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `repo_commit.go` (+2 -1) 📝 `repo_commit_test.go` (+10 -0) </details> ### 📄 Description This error message for a bad commitID makes no sense because when the Error object is created, commitID is always empty since NewCommand() call replaced the given commitID. This makes sure we retain the old commitID until after this block. --- <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:16 -05:00
yindo closed this issue 2026-02-16 10:24:16 -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#148