Open sandr01d opened 1 year ago
Not sure if this helps, but delta
supports this option:
--blame-timestamp-output-format <FMT>
Format string for git blame timestamp output.
This string is used for formatting the timestamps in git blame output. It must follow the `strftime` format syntax specification. If it is not present, the timestamps will be formatted in a human-friendly but possibly less accurate form.
See: (https://docs.rs/chrono/latest/chrono/format/strftime/index.html)
For instance, to have absolute dates by default, put this in .gitconfig
:
[delta]
blame-timestamp-output-format = %c
Using the -t
option also doesn't produce colored output
The timestamp on the blame line is parsed with this regex which parses the timestamp as [0-9]{4}-[0-9]{2}-[0-9]{2}\ [0-9]{2}:[0-9]{2}:[0-9]{2}\ [-+][0-9]{4}
.
There are many standard formats for --date
parameter. These and the -t
option could be tried alternatively with one or many regex but the --date=format:...
won't be parseable this way.
The regex should accept more formats with #925, but supporting the various --date
options needs more robust parsing.
When using the --date option with git blame, delta does not color the output when the value is anything other than iso8601 or iso8601-local. E.g.
git blame --date=short FILENAME
does not produce colored output, whilegit blame --date=iso8601 FILENAME
does.[X] Please include the raw text output from git, so that we can reproduce the problem. (You can use
git --no-pager
to produce the raw text output.)[X] A screenshot of Delta's output is often helpful also.
I've created an asciinema here: