mirror of
https://github.com/go-gitea/git.git
synced 2026-07-25 12:46:00 -04:00
[PR #148] [MERGED] Fix for bad commitID to show up in error #148
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:feature-4762-api-content-create-update-delete📝 Commits (3)
53bbebfFix for bad commitID to show up in error8e5b8f3Adds test for repo_commit GetCommit0c7c947Adds 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.