Add --json output for git lfs track#5006
Merged
bk2204 merged 1 commit intogit-lfs:mainfrom May 12, 2022
Merged
Conversation
chrisd8088
approved these changes
May 11, 2022
Member
chrisd8088
left a comment
There was a problem hiding this comment.
Some minor questions only; this is great, thank you!
We want a machine readable output for git lfs track, so add a --json flag to add this.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
May 15, 2025
A number of our commands accept a --json option, which causes the commands to write the details of their operation in JSON format to standard output, unless the command fails for some reason. Our manual pages document this option for the majority of commands that support it, but not for the "git lfs track" command, which was updated in commit 6f37e98 of PR git-lfs#5006 to also provide JSON output when passed the --json option. As well, the "git lfs track" command does not yet accept the same short -j version of the --json option as all the other commands. We address these issues by adding support for the -j short option to the "git lfs track" command and documenting both the --json and -j options in the corresponding manual page. Further, we take the opportunity to update the descriptions of the same options in our git-lfs-fetch(1) and git-lfs-ls-files(1) manual pages so they use the same language found in the manual pages for the other Git LFS commands that can provide JSON-formatted output.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 27, 2025
A number of our commands accept a --json option, which causes the commands to write the details of their operation in JSON format to standard output, unless the command fails for some reason. Our manual pages document this option for the majority of commands that support it, but not for the "git lfs track" command, which was updated in commit 6f37e98 of PR git-lfs#5006 to also provide JSON output when passed the --json option. As well, the "git lfs track" command does not yet accept the same short -j version of the --json option as all the other commands. We address these issues by adding support for the -j short option to the "git lfs track" command and documenting both the --json and -j options in the corresponding manual page. Further, we take the opportunity to update the descriptions of the same options in our git-lfs-fetch(1), git-lfs-ls-files(1), and git-lfs-status(1) manual pages so they use the same language found in the manual pages for the other Git LFS commands that provide the option of JSON-formatted output, and describe the how the --json option interoperates with other options.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 27, 2025
A number of our commands accept a --json option, which causes the commands to write the details of their operation in JSON format to standard output, unless the command fails for some reason. Our manual pages document this option for the majority of commands that support it, but not for the "git lfs track" command, which was updated in commit 6f37e98 of PR git-lfs#5006 to also provide JSON output when passed the --json option. As well, the "git lfs track" command does not yet accept the same short -j version of the --json option as all the other commands. We address these issues by adding support for the -j short option to the "git lfs track" command and documenting both the --json and -j options in the corresponding manual page. Further, we take the opportunity to update the descriptions of the same options in our git-lfs-fetch(1), git-lfs-ls-files(1), and git-lfs-status(1) manual pages so they use the same language found in the manual pages for the other Git LFS commands that provide the option of JSON-formatted output, and describe the how the --json option interoperates with other options.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 27, 2025
A number of our commands accept a --json option, which causes the commands to write the details of their operation in JSON format to standard output, unless the command fails for some reason. Our manual pages document this option for the majority of commands that support it, but not for the "git lfs track" command, which was updated in commit 6f37e98 of PR git-lfs#5006 to also provide JSON output when passed the --json option. As well, the "git lfs track" command does not yet accept the same short -j version of the --json option as all the other commands. We address these issues by adding support for the -j short option to the "git lfs track" command and documenting both the --json and -j options in the corresponding manual page. Further, we take the opportunity to update the descriptions of the same options in our git-lfs-fetch(1), git-lfs-ls-files(1), and git-lfs-status(1) manual pages so they use the same language found in the manual pages for the other Git LFS commands that provide the option of JSON-formatted output, and describe the how the --json option interoperates with other options.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want a machine readable output for git lfs track, so add a
--jsonflag to add this.Fixes #4921