Repository navigation
Closed
Labels
Description
After cloning the repo with git lfs configured to pull. I then pull again via 'git lfs -I' which results in the files being marked by git as modified.
I setup this repo on GitHub the can be used to recreate this issue.
[email protected]:carlg1/gitlfsbug1.git
carlg@carlg:~/Source/Debug/carlsgithub$ git version
git version 2.14.1
carlg@carlg:~/Source/Debug/carlsgithub$ git lfs version
git-lfs/2.3.1 (GitHub; linux amd64; go 1.8.1)
carlg@carlg:~/Source/Debug/carlsgithub$ git lfs env
git-lfs/2.3.1 (GitHub; linux amd64; go 1.8.1)
git version 2.14.1
LocalWorkingDir=
LocalGitDir=
LocalGitStorageDir=
LocalMediaDir=
LocalReferenceDir=
TempDir=/tmp/git-lfs
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
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"
carlg@carlg:~/Source/Debug/carlsgithub$ git clone [email protected]:carlg1/gitlfsbug1.git gitlfsbug1_2
Cloning into 'gitlfsbug1_2'...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 0), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (8/8), done.
Downloading dir1/yum-3.4.3.tar.gz (1.1 MB)
Downloading jars/qc.jar (10 KB)
Downloading jars/qc_json.jar (24 KB)
carlg@carlg:~/Source/Debug/carlsgithub$
carlg@carlg:~/Source/Debug/carlsgithub$ cd gitlfsbug1_2
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2(master)$ cd jars/
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ file qc.jar
qc.jar: Java archive data (JAR)
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ git st
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ GIT_TRACE=1 GIT_CURL_VERBOSE=1 LFS_DEBUG_HTTP=1 DEBUG=1 git lfs pull -I'*.jar'
10:02:50.360735 git.c:560 trace: exec: 'git-lfs' 'pull' '-I*.jar'
10:02:50.360803 run-command.c:626 trace: run_command: 'git-lfs' 'pull' '-I*.jar'
trace git-lfs: run_command: 'git' version
trace git-lfs: run_command: 'git' config -l
trace git-lfs: run_command: 'git' -c filter.lfs.smudge= -c filter.lfs.clean= -c filter.lfs.process= -c filter.lfs.required=false rev-parse HEAD --symbolic-full-name HEAD
trace git-lfs: run_command: 'git' config branch.master.remote
trace git-lfs: run_command: 'git' -c filter.lfs.smudge= -c filter.lfs.clean= -c filter.lfs.process= -c filter.lfs.required=false rev-parse HEAD --symbolic-full-name HEAD
trace git-lfs: tq: running as batched queue, batch size of 100
trace git-lfs: run_command: git cat-file --batch
trace git-lfs: tq: sending batch of size 0
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ git st
MM qc.jar
MM qc_json.jar
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ git lfs fsck
Git LFS fsck OK
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ git lfs ls-files
0178f97820 - dir1/yum-3.4.3.tar.gz
065040aae8 - jars/qc.jar
4da1bcae7e - jars/qc_json.jar
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ file qc.jar
qc.jar: Java archive data (JAR)
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ git diff
diff --git a/jars/qc.jar b/jars/qc.jar
index 3ab609d..e62b364 100644
Binary files a/jars/qc.jar and b/jars/qc.jar differ
diff --git a/jars/qc_json.jar b/jars/qc_json.jar
index 7180586..b7c1610 100644
Binary files a/jars/qc_json.jar and b/jars/qc_json.jar differ
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ git diff --staged
diff --git a/jars/qc.jar b/jars/qc.jar
index e62b364..3ab609d 100644
Binary files a/jars/qc.jar and b/jars/qc.jar differ
diff --git a/jars/qc_json.jar b/jars/qc_json.jar
index b7c1610..7180586 100644
Binary files a/jars/qc_json.jar and b/jars/qc_json.jar differ
Activity
[-]git lfs pull -I <argument> on already pulled files causes file to show as modified twice[/-][+]git lfs pull -I <argument> on already pulled files causes file to show as modified[/+]technoweenie commentedon Oct 3, 2017
I can't replicate it:
What does
git lfs statusshow?carlg1 commentedon Oct 3, 2017
carlg1 commentedon Oct 3, 2017
carlg@carlg:~/Source/Debug/carlsgithub/gitlfsbug1_2/jars(master)$ cat /etc/issue
Ubuntu 16.04.3 LTS \n \l
carlg1 commentedon Oct 3, 2017
I missed a step
After the clone cd into 'jars' dir
technoweenie commentedon Oct 3, 2017
Ah, that's the key then. It seems to work fine when run from the root. The
git lfs statusoutput is a little weird, it shows it changing from an LFS file to a Git file, with the same hash. I think it's an issue with the git index, since the file contents aren't actually changing.The diff shows it changing to
e62b364:I think what's happening is that the file contents are being added to the git index, and then the LFS pointer is re-added. That's why
git statusshows the files twice:It's definitely a bug. For now, just run that command from the root of the repository.
carlg1 commentedon Oct 3, 2017
Okay, thanks for the update.
technoweenie commentedon Oct 3, 2017
Found the root cause. Good news is this will make the cut for v2.3.2 :) Thanks for the report!
t: test index is updated on checkout and pull
t: test index is updated on checkout and pull
t: test index is updated on checkout and pull