Skip to content

git lfs migrate import --everything ignores remote refs #5316

@GLaN1K

Description

@GLaN1K

Describe the bug

--everything in git lfs migrate import --everything ignored all remote refs

To Reproduce

  1. Clone repo which was prepared for the test:
git clone https://gitlab.com/nikita.savitsky1/lfs-migration-test

In it, there are two branches main and test_branch:

glanik@Luna ~/lfs-migration-test:main 0> git show-ref
127eefa52cdb16bf4ad726aa1a83600f11ccf753 refs/heads/main
27db8eb4158f34493f0e238695274e6ea014cc51 refs/remotes/origin/HEAD
27db8eb4158f34493f0e238695274e6ea014cc51 refs/remotes/origin/main
27db8eb4158f34493f0e238695274e6ea014cc51 refs/remotes/origin/test_branch
  1. Execute migration with --everything
 git lfs migrate import --everything --include="*.dat"
  1. In output, only main was migrated, but test_branch was ignored:
migrate: Sorting commits: ..., done.
migrate: Rewriting commits: 100% (3/3), done.
  main  27db8eb4158f34493f0e238695274e6ea014cc51 -> 127eefa52cdb16bf4ad726aa1a83600f11ccf753
migrate: Updating refs: ..., done.
migrate: checkout: ..., done.

Expected behavior

All remote refs, including test_branch should have been migrated

System environment

M1 ARM CPU, MacOS "Ventura" Version 13.2.1 (22D68)

Output of git lfs env

glanik@Luna ~/lfs-migration-test:main 0> git lfs env
git-lfs/3.1.2 (GitHub; darwin arm64; go 1.17.6)
git version 2.30.1

Endpoint=https://gitlab.com/nikita.savitsky1/lfs-migration-test.git/info/lfs (auth=none)
  SSH=git@gitlab.com:nikita.savitsky1/lfs-migration-test.git
LocalWorkingDir=/Users/glanik/lfs-migration-test
LocalGitDir=/Users/glanik/lfs-migration-test/.git
LocalGitStorageDir=/Users/glanik/lfs-migration-test/.git
LocalMediaDir=/Users/glanik/lfs-migration-test/.git/lfs/objects
LocalReferenceDirs=
TempDir=/Users/glanik/lfs-migration-test/.git/lfs/tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=/Users/glanik/lfs-migration-test/.git/lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_EXEC_PATH=/opt/homebrew/Cellar/git/2.30.1/libexec/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions