forked from git-lfs/git-lfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commands,t: fix output of ls-files in subdirectory
As reported in the following issue comment, the "git lfs ls-files" command does not report the presence or absence of Git LFS object files in the working tree correctly unless the command is run the root directory of the working tree: git-lfs#1189 (comment) We resolve this problem by ensuring that the full, canonicalized path to the working tree is prepended by the fileExistsOfSize() helper function to the paths of the files whose presence it checks with the os.Stat() function. We then add two new tests which validate the correct behaviour of the command when it is run in a subdirectory of the working tree. These tests would fail without the accompanying bug fix to the command. We also add another two new tests which confirm the same behaviour when the --json option is used. The use of a separate test for this option was preferred in PR git-lfs#5007 when the --json option was first introduced (rather than overloading the existing tests, as was done for the --debug option when it was added in PR git-lfs#2540), so we follow that model here as well.
- Loading branch information
1 parent
c26ae12
commit b4f3f37
Showing
2 changed files
with
266 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters