Skip to content

Add --json output for git lfs track#5006

Merged
bk2204 merged 1 commit intogit-lfs:mainfrom
bk2204:track-json
May 12, 2022
Merged

Add --json output for git lfs track#5006
bk2204 merged 1 commit intogit-lfs:mainfrom
bk2204:track-json

Conversation

@bk2204
Copy link
Member

@bk2204 bk2204 commented May 11, 2022

We want a machine readable output for git lfs track, so add a --json flag to add this.

Fixes #4921

@bk2204 bk2204 marked this pull request as ready for review May 11, 2022 20:12
@bk2204 bk2204 requested a review from a team as a code owner May 11, 2022 20:12
Copy link
Member

@chrisd8088 chrisd8088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@bk2204 bk2204 merged commit 5241272 into git-lfs:main May 12, 2022
@bk2204 bk2204 deleted the track-json branch May 12, 2022 13:46
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Separate tracked listing versus excluded

2 participants