Skip to content

commands: teach '--all' to git lfs ls-files #2796

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

Merged
merged 7 commits into from
Jan 3, 2018
Merged

commands: teach '--all' to git lfs ls-files #2796

merged 7 commits into from
Jan 3, 2018

Conversation

ttaylorr
Copy link
Contributor

@ttaylorr ttaylorr commented Dec 19, 2017

This pull request adds a new flag to the git lfs ls-files command, --all to scan for all LFS objects in a repository, not just those at the given reference (or HEAD, by default).

This feature was requested by @emericv in #2575:

There is a way to have the whole LFS object sha256 list from a git repo? (like a git-lfs ls-files, but including modified/deleted objects refs of all branchs/tags).

@technoweenie suggested in #2575 (comment) to use ScanRefWithDeleted, but I think that --all may be sufficient (ignoring reference arguments). That said, it might be worth expanding this to cover:

  1. --all: the entire repository, ignoring the explicit reference argument.
  2. --deleted: the entire reference space, showing deleted objects (via ScanTreeWithDeleted()).

EDIT: I implemented the above in c4d5f49.

Closes: #2575.

/cc @git-lfs/core #2575

@ttaylorr ttaylorr requested a review from rubyist December 19, 2017 23:45
@ttaylorr ttaylorr added this to the v2.4.0 milestone Dec 19, 2017
@ttaylorr ttaylorr merged commit a512dd9 into master Jan 3, 2018
@ttaylorr
Copy link
Contributor Author

ttaylorr commented Jan 3, 2018

Thanks for the review! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants