mirror of
https://github.com/go-gitea/git.git
synced 2026-07-25 12:46:00 -04:00
[PR #135] [MERGED] command: fix NewCommand #135
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/135
Author: @michaelkuhn
Created: 11/27/2018
Status: ✅ Merged
Merged: 11/27/2018
Merged by: @lafriks
Base:
master← Head:newcommand-append📝 Commits (1)
ad7491dcommand: fix NewCommand📊 Changes
1 file changed (+4 additions, -1 deletions)
View changed files
📝
command.go(+4 -1)📄 Description
Make an explicit copy of GlobalCommandArgs, otherwise append might overwrite it.
My recent PR for Gitea (https://github.com/go-gitea/gitea/pull/5367) exposed a bug that caused wrong commands to be executed:
(
--sortis an argument fortag, not forcat-file.)The problem seems to be that GlobalCommandArgs is changed by append, which triggers this behavior.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.