Describe the bug
I have trim.delete = merged-local,merged-remote:origin,stray in my git config. When I git fetch --prune before running git trim and multiple delete filters apply to the same ref name the output is e.g.:
[...]
Delete merged local branches:
- some-branch
Delete stray local branches:
- some-branch
Confirm? yes
error: could not delete references: multiple updates for ref 'refs/heads/some-branch' not allowed
error: could not delete references:
Error: Operation not permitted (os error 1)
Steps to reproduce
Not actual git-trim reproduction steps but with the git CLI that gets executed by branch_delete:
$ git checkout -b some-branch
$ git checkout -
$ # git-trim behavior
$ git branch --delete --force some-branch some-branch
error: could not delete references: multiple updates for ref 'refs/heads/some-branch' not allowed
error: could not delete references:
Hi @pmarschik ! Thank you for reporting the issue.
A branch shouldn't be applied to multiple filters. Sorry to say that I'm a little bit busy at the moment. I'll fix the issue as I have time.
Check your version before submitting the bug
Describe the bug I have
trim.delete = merged-local,merged-remote:origin,stray
in my git config. When Igit fetch --prune
before runninggit trim
and multiple delete filters apply to the same ref name the output is e.g.:Steps to reproduce Not actual
git-trim
reproduction steps but with thegit
CLI that gets executed bybranch_delete
:Expected behavior
branch_names
in https://github.com/foriequal0/git-trim/blob/385d8818e3b8db9a73b0f32993f53d1ba0d31386/src/subprocess.rs#L257 should probably be aHashSet
instead ofVec
so the branches are deleted.Actual behaviour
git
subprocess fails.Additional context and logs & dumps if necessary You should remove sensitive informations before put them here.