LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

jj-file-annotate

shows the source change for each line of a file

TLDR

Annotate a file in the working copy
$ jj file annotate [path/to/file]
copy
Annotate starting at a specific revision
$ jj file annotate -r [revision] [path/to/file]
copy
Annotate with a custom template
$ jj file annotate -T "[template]" [path/to/file]
copy

SYNOPSIS

jj file annotate [options] PATH

DESCRIPTION

jj file annotate prints a file line by line with the source change that introduced each line. It is the Jujutsu equivalent of git blame: given a path, it walks history from the chosen revision and labels every line with the change that last touched it.The default template is configured with templates.file_annotate. Override it per invocation with -T. See `jj help -k templates` for the template language.

PARAMETERS

PATH

File to annotate. Required.
-r, --revision REVSET
Revision to start from (default: working-copy commit @).
-T, --template TEMPLATE
Render each line with a custom template. Keywords are the 0-argument methods of the AnnotationLine type. Defaults to the templates.file_annotate setting.

INSTALL

sudo pacman -S jujutsu
copy
sudo apk add jujutsu
copy
sudo zypper install jujutsu
copy
brew install jujutsu
copy
nix profile install nixpkgs#jujutsu
copy

CAVEATS

Subcommand of jj. A path must be provided. Template syntax is Jujutsu-specific.

SEE ALSO

jj-file(1), jj-file-show(1), git-blame(1), jj(1)

RESOURCES

Copied to clipboard
Kai