Explicitly provided fully qualified reference for the git branch, becase can be exists a tag and a branch with identical names (#1093)

Fix push command for branch deletion

Updated the `push` command to use `--delete refs/heads/{name}` instead of `--delete {name}` for clearer branch reference when deleting a remote branch.

Co-authored-by: Michael Pakhantsov <michae.pakhantsov@gmail.com>
This commit is contained in:
Michael Pakhantsov 2025-03-14 03:26:59 +02:00 committed by GitHub
parent 67f4330dd4
commit 9645b65db6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@
if (exists) if (exists)
{ {
cmd.SSHKey = new Config(repo).Get($"remote.{remote}.sshkey"); cmd.SSHKey = new Config(repo).Get($"remote.{remote}.sshkey");
cmd.Args = $"push {remote} --delete {name}"; cmd.Args = $"push {remote} --delete refs/heads/{name}";
} }
else else
{ {