-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ls-files: add support for reference range #3764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to Git LFS! This looks good overall. I had just one suggestion for the documentation so that it's a bit clearer what the behavior is with deletions.
docs/man/git-lfs-ls-files.1.ronn
Outdated
|
||
## DESCRIPTION | ||
|
||
Display paths of Git LFS files that are found in the tree at the given | ||
reference. If no reference is given, scan the currently checked-out branch. | ||
If two references are given, the LFS files that are modified between the two | ||
references are shown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like your test checks that we don't print deletions. That's fine, but we probably want to mention it here, since Git considers a deletion to be a modification. Maybe add a semicolon and “deletions are not listed”?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! What do you prefer, that I create a new commit or amend the original commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you could amend the original commit, that would be great.
Teach the ls-files command to show the modified LFS files in a specified commit range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thanks!
Add an option to the
ls-files
command where the user can specify a commit range. This will return all the lfs files which changed between those two commits.This change is based on the aborted pull request #3151 by @larsxschneider. I finished implementation and added unit tests and documentation.
As background information, the reason for this option is that I have a script that creates a git bundle. To workaround the missing bundle support in lfs (see #1755), I want to know which lfs objects were changed/created in the commit range of the bundle. Currently, in the script, I walk over all commits in the range and do a compare of the
ls-files
output. This is very slow however, so ifls-files
has support for a commit range that would help me a lot.