docs: fix jj template syntax example [AGENT]#10
Closed
utiberious wants to merge 1 commit intoutensil:mainfrom
Closed
docs: fix jj template syntax example [AGENT]#10utiberious wants to merge 1 commit intoutensil:mainfrom
utiberious wants to merge 1 commit intoutensil:mainfrom
Conversation
- Replace incorrect template syntax: '{commit_id} {description}'
- With correct syntax: 'commit_id.short(7) ++ " | " ++ author.email().local() ++ " | " ++ description.first_line()'
- Added common field reference with link to official docs
- Common fields included: commit_id.short(), description.first_line(), author.email().local(), local_bookmarks(), empty()
- Provides practical example reducing documentation lookup needs
Owner
|
Thanks! Superseded by 9d4a667 — went with a richer template covering change_id, commit_id, author name, relative timestamp, and local bookmarks. |
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.
问题
在 AGENTS.md 中 jj 模板的示例使用了错误的语法。
修改内容
修正 Commit discipline 部分的 jj 模板示例,将错误的 f-string 风格语法替换为正确的 jj 模板语法:
❌ 错误:
jj log --no-graph -T '{commit_id} {description}'✅ 正确:
jj log --no-graph -T 'commit_id.short(7) ++ " | " ++ description.first_line()'技术细节
++操作符进行模板拼接.short()、String 的.first_line()验证
已根据官方文档验证语法正确性: