You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check your version before submitting the bug git-trim is still 0.x version and I do make a lot of silly bugs.
Some bugs might be fixed on upstream version. Please update it and make sure that you're using the upstream version
especially you've installed git-trim other than cargo install such as Homebrew or AUR.
Describe the bug
It seems to have issues with having an 'upstream' and an 'origin' remote (as created by gh pr create). After my PR got merged, git-trim determined that the master branch could be deleted.
To Reproduce
Minimal reproducible git repo if available:
upstream: foriequal0/git-trim, origin: foriequal0/git-trim
CLI command and configs
See below. Just 'git trim'
Steps to reproduce the behavior
Run git-trim in this very repo, while having "master" checked out. However master tracks my forked repo and my PR got merged. Hence, there's no need for the master-branch exactly anymore.
Expected behavior
Git-trim should not try to remove the master branch.
Actual behaviour
git-trim tries to delete the master branch. Git refuses because the branch is currently checked out. And git-trim exits with an error.
If applicable, add logs and stacktraces to help explain your problem.
Additional context and logs & dumps if necessary
You should remove sensitive informations before put them here.
Logs and stacktraces if necessary
You should remove sensitive informations before put them here.
You can get more detailed and clean logs by setting some environment variable with follwing command
export RUST_LOG=trace
export RAYON_NUM_THREADS=1
export RUST_BACKTRACE=full
git trim --no-confirm 2>&1| tee <log_file>
Deleting checked-out branch is an expected behavior (you can turn it off with --no-detach flag or git config trim.detach false)
Also you can protect a branch with --protected master flag or git config trim.protected master to protect all branches named 'master'.
Technically, git doesn't know whether branch a is somewhat connected with branch b except a and b is tracking/upstream relationship.
However in this case, I think git trim should have deduced that both origin/master and upstream/master are (unrelated) bases. I'll prepare fixes.
All the branch management strategy that I've used think feature branches are ephemeral. I've intended git-trim to trim these feature branches, and users should move on to other branch (such as master or other feature branches)
Check your version before submitting the bug
git-trim
is still0.x
version and I do make a lot of silly bugs.Some bugs might be fixed on upstream version. Please update it and make sure that you're using the upstream version
especially you've installed
git-trim
other thancargo install
such as Homebrew or AUR.Describe the bug
It seems to have issues with having an 'upstream' and an 'origin' remote (as created by
gh pr create
). After my PR got merged, git-trim determined that the master branch could be deleted.To Reproduce
upstream: foriequal0/git-trim, origin: foriequal0/git-trim
See below. Just 'git trim'
Run git-trim in this very repo, while having "master" checked out. However master tracks my forked repo and my PR got merged. Hence, there's no need for the master-branch exactly anymore.
Expected behavior
Git-trim should not try to remove the master branch.
Actual behaviour
git-trim tries to delete the master branch. Git refuses because the branch is currently checked out. And git-trim exits with an error.
If applicable, add logs and stacktraces to help explain your problem.
Additional context and logs & dumps if necessary
You should remove sensitive informations before put them here.
git rev-parse --abbrev-ref HEAD
: mastergit show-ref
(see below)git config --get-regexp '(push|fetch|remote|branch|trim).*' | sort
git log --oneline --graph --all
--> Attached.git-trim-bug-2.log
Logs and stacktraces if necessary
You should remove sensitive informations before put them here.
You can get more detailed and clean logs by setting some environment variable with follwing command
--> Attached
git-trim-bug.log
git show-ref
:The text was updated successfully, but these errors were encountered: