mirror of
https://github.com/go-gitea/git.git
synced 2026-07-19 14:33:37 -04:00
[PR #56] [MERGED] Return error from cmd.Wait() #66
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/56
Author: @ethantkoenig
Created: 5/28/2017
Status: ✅ Merged
Merged: 5/29/2017
Merged by: @lunny
Base:
master← Head:fix_command📝 Commits (1)
af5e39cReturn error from cmd.Wait()📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
command.go(+1 -1)📄 Description
Check and return the error returned by
cmd.Wait(), instead of quietly logging and ignoring.Ignoring this error, because the subsequent call to
ctx.Err()may returnnileven ifcmd.Wait()returned an actual error. For instance,git show-ref --verify <non-existent-branch>will fail with a exit code of 128, andcmd.Wait()will return an error, butcmd.Wait()will returnnil.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.