cli: test deletion via `git push -d`

Ensure that remote branches can be delete via the `-d` flag. This
includes the fact that one can delete the `refs/heads/patches`
branches, as long as they are owned by the current operator.
This commit is contained in:
Fintan Halpenny 2024-10-24 09:43:17 +01:00 committed by cloudhead
parent 43e08a8e70
commit ccc0297b5a
No known key found for this signature in database
1 changed files with 15 additions and 0 deletions

View File

@ -18,3 +18,18 @@ $ git ls-remote rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JU
ddcc1f164eacfd7dba41da9bff3261da3ee79fd3 refs/heads/alice/2
f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master
```
``` (stderr) RAD_SOCKET=/dev/null
$ git checkout alice/2
Switched to a new branch 'alice/2'
$ git push rad HEAD:refs/patches
✓ Patch bb9b0d5b8de8d5e2a4cba45f02bd35b3e2678fbe opened
To [..]
* [new reference] HEAD -> refs/patches
```
``` (stderr) RAD_SOCKET=/dev/null
$ git push rad alice/2 -d
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
- [deleted] alice/2
```