Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: Add commit_timestamp(commit) template alias #5139

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

jennings
Copy link
Contributor

@jennings jennings commented Dec 18, 2024

Adds an extension point for changing which date is displayed in log formats. The function should return a timestamp, not a formatted string.

Fixes: #5132

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@jennings jennings force-pushed the jennings/push-zmpzotrkwtzz branch from 30e9ad0 to 598627a Compare December 18, 2024 21:34
@tim-janik
Copy link
Contributor

LGTM!
And you should add: fixes #5132

Adds an extension point for changing which date is displayed in log
formats. The function should return a timestamp, not a formatted string.
@jennings jennings force-pushed the jennings/push-zmpzotrkwtzz branch from 598627a to 467c610 Compare December 18, 2024 21:43
@jennings jennings marked this pull request as ready for review December 18, 2024 22:01
@tim-janik
Copy link
Contributor

Great, works like a charm.

$ jj log -r lnmpvwmu -T builtin_log_oneline
◆  lnmpvwmu yuya 2024-12-18 01:51:56 6bbaf79c settings: parse TOML date-time value as well as string timestamp
$ jj config set --repo 'template-aliases."commit_timestamp(commit)"' '"commit.author().timestamp()"'
$ jj log -r lnmpvwmu -T builtin_log_oneline
◆  lnmpvwmu yuya 2024-12-15 14:58:54 6bbaf79c settings: parse TOML date-time value as well as string timestamp

@jennings jennings merged commit 3316180 into jj-vcs:main Dec 19, 2024
18 checks passed
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.

FR: Adjust jj log to display author date instead of committer date
3 participants