Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use all remote HEADs #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use all remote HEADs #175

wants to merge 3 commits into from

Conversation

foriequal0
Copy link
Owner

Fixes: #174

@foriequal0 foriequal0 added the bug Something isn't working label Nov 13, 2020
@siedentop
Copy link

siedentop commented Nov 13, 2020

I still have the same (or similar) error as in #174. I installed git-trim from this branch.

EDIT: This also happens when I run it with --no-detach.

[2020-11-13T19:18:51Z TRACE git_trim::subprocess] | c0e130257676fec91b4e452ea1f3e240bdd966dc
[2020-11-13T19:18:51Z TRACE git_trim::subprocess] > git rev-list --cherry-pick --right-only --no-merges -n1 refs/remotes/upstream/master...1ade483b12d615a184ad092bc970ee6b5c3d71fc
[2020-11-13T19:18:51Z TRACE git_trim::subprocess] | 1ade483b12d615a184ad092bc970ee6b5c3d71fc
[2020-11-13T19:18:51Z DEBUG git_trim::core] Result #1: ClassificationResponse {
        message: "local & upstream are merged",
        result: [
            MergedLocal(
                LocalBranch {
                    refname: "refs/heads/master",
                },
            ),
            MergedRemoteTracking(
                RemoteTrackingBranch {
                    refname: "refs/remotes/origin/master",
                },
            ),
        ],
    }
[2020-11-13T19:18:51Z DEBUG git_trim::core] Result #0: ClassificationResponse {
        message: "local & upstream are not merged yet",
        result: [],
    }
[2020-11-13T19:18:51Z TRACE git_trim::subprocess] > git worktree list --porcelain
[2020-11-13T19:18:51Z TRACE git_trim::subprocess] | worktree /home/user/src/git-trim
[2020-11-13T19:18:51Z TRACE git_trim::subprocess] | HEAD 385d8818e3b8db9a73b0f32993f53d1ba0d31386
[2020-11-13T19:18:51Z TRACE git_trim::subprocess] | branch refs/heads/master
[2020-11-13T19:18:51Z TRACE git_trim::core] Delete range result: MergedLocal(LocalBranch { refname: "refs/heads/master" }) => None
[2020-11-13T19:18:51Z TRACE git_trim::core] Delete range result: MergedRemoteTracking(RemoteTrackingBranch { refname: "refs/remotes/origin/master" }) => None
Branches that will remain:
  local branches:
    all-your-bases
  remote references:
    upstream/all-your-bases
    upstream/master *3
  Some branches are skipped. Consider following to scan them:
    *3: Make it upstream of a tracking branch or add `--delete 'remote:upstream' flag.

Delete merged local branches:
  - master
Delete merged remote refs:
  - origin, refs/heads/master
Confirm? yes
[2020-11-13T19:18:55Z TRACE git_trim::subprocess] > git push --delete origin refs/heads/master
To https://github.com/siedentop/git-trim.git
 ! [remote rejected] master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/siedentop/git-trim.git'
Error: Operation not permitted (os error 1)

@foriequal0
Copy link
Owner Author

I've fixed notification for remote head changes. It'll tell you what to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not delete the checked-out branch (also don't delete master/main).
2 participants