Skip to content

git lfs ls-files does not list duplicates #307

@andyneff

Description

@andyneff

I was just using git lfs ls-files to verify which files were being tracked, and I noticed when I expected to see two files, I only saw one. It turns out this was because they were identical files. Everything seemed to be functioning properly though, only one POST to my test lfs server, and only one GET file request when cloning, but git lfs ls-files only shows one file instead of both. I found this very confusing, and think it would be nice if it would at least list both (and maybe even tell me it's a duplicate?)

git init
git lfs init
git config lfs.url http://localhost:8080/git/test/

git lfs track '*.tgz'
git add .gitattributes

ls /proc -la > one.tgz
cp one.tgz two.tgz

git add one.tgz
git add two.tgz

git commit -m "commit"

git lfs ls-files yields

one.tgz

Instead of something like

one.tgz
two.tgz (duplicate of one.tgz)

Using version 0.5.1 of git-lfs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions