-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When the remote repo has branches that are not in sync with the local one, the tool gives a very clear warning:
Remote 'cabbey' is not up to date with 1 local branch(es):
- main
This will likely impair detection of merged branches for remote 'cabbey'.
Please consider getting it back in sync by running
$ git push cabbey main
and then invoking git-delete-merged-branches, again.
However when the opposite is true, you just get a warning and error from git and an overall failure:
warning: not deleting branch 'improve-encryption' that is not yet merged to
'refs/remotes/cabbey/improve-encryption', even though it is merged to HEAD.
error: The branch 'improve-encryption' is not fully merged.
If you are sure you want to delete it, run 'git branch -D improve-encryption'.
Deleted branch bye-render (was 30e49492767).
Deleted branch crop-vs-orientation (was 95b84c24f6d).
...
Error: Command 'git branch --delete bye-render crop-vs-orientation improve-encryption ...' returned non-zero exit status 1.
It would be nice if the tool could detect that this is going to happen and either omit those branches from the delete command and explain to the user that they are not in sync. (In my case there had been a last minute merge of main into the branch, which was then merged to main and pushed up to upstream, but was not pushed to my personal fork. I just did a git branch -D improve-encryption and re-ran the tool.)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request