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

squashing forks with remotes already setup fails #101

Open
amtoine opened this issue Nov 19, 2023 · 0 comments
Open

squashing forks with remotes already setup fails #101

amtoine opened this issue Nov 19, 2023 · 0 comments
Labels
bug Something isn't working as expected core Related to the main `nu-git-manager` module needs-triage The issues hasn't been triaged yet

Comments

@amtoine
Copy link
Owner

amtoine commented Nov 19, 2023

Describe the bug

as per title

How to reproduce

first run

tk run --clean {
    gm update-cache

    # clone two forks
    gm clone https://github.com/amtoine/nushell
    gm clone https://github.com/nushell/nushell

    # setup `nushell` as a remote of `amtoine`
    ^git -C ($env.GIT_REPOS_HOME | path join "github.com/amtoine/nushell") remote add nushell https://github.com/nushell/nushell

    # try to squash into `amtoine`
    gm squash-forks --non-interactive-preselect {
        8f3b273337b53bd86d5594d5edc9d4ad7242bd4c: "github.com/amtoine/nushell"
    }
}
deleted /tmp/nu-git-manager/repos
deleted /tmp/nu-git-manager/repos.cache
updating cache... done
Cloning into '/tmp/nu-git-manager/repos/github.com/amtoine/nushell'...
remote: Enumerating objects: 102625, done.
remote: Counting objects: 100% (102625/102625), done.
remote: Compressing objects: 100% (27930/27930), done.
remote: Total 102625 (delta 73950), reused 101765 (delta 73656), pack-reused 0
Receiving objects: 100% (102625/102625), 38.30 MiB | 21.49 MiB/s, done.
Resolving deltas: 100% (73950/73950), done.
updating cache... done
Cloning into '/tmp/nu-git-manager/repos/github.com/nushell/nushell'...
remote: Enumerating objects: 102194, done.
remote: Counting objects: 100% (102194/102194), done.
remote: Compressing objects: 100% (27838/27838), done.
remote: Total 102194 (delta 73627), reused 101309 (delta 73323), pack-reused 0
Receiving objects: 100% (102194/102194), 38.24 MiB | 12.13 MiB/s, done.
Resolving deltas: 100% (73627/73627), done.
Warning:   ⚠ cloning_fork
| this repo is a fork of 1 other repo because they share the same root commit: 8f3b273337b53bd86d5594d5edc9d4ad7242bd4c
| - github.com/amtoine/nushell
updating cache... done
error: remote nushell already exists.

Note
see the error at the bottom

now, if we list the repos, we still see nushell...

tk run { gm list }
─┬──────────────────────────
0│github.com/amtoine/nushell
1│github.com/nushell/nushell
─┴──────────────────────────

Expected behavior

i expected tk run { gm list } to only return the amtoine fork.

Configuration

key value
version 0.87.0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.73.0 (cc66ad468 2023-10-03)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.73.0 (9c4383fb5 2023-08-26)
build_time 2023-11-15 18:45:43 +01:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash, which, zip
installed_plugins clipboard copy, clipboard paste, jwalk, nu_plugin_explore

Additional context

No response

@amtoine amtoine added bug Something isn't working as expected needs-triage The issues hasn't been triaged yet core Related to the main `nu-git-manager` module labels Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected core Related to the main `nu-git-manager` module needs-triage The issues hasn't been triaged yet
Projects
None yet
Development

No branches or pull requests

1 participant