Commit graph

850 commits

Author SHA1 Message Date
Felix Geisendörfer
7335ed90a3 docs: add jjui to the list of community tools
Disclaimer: I am not associated with jjui, but enjoy using it.
2025-05-19 13:45:45 +00:00
Vincent Ging Ho Yim
941f55d85f docs/operation-log: Fix section header casing 2025-05-19 02:19:49 +00:00
Yuya Nishihara
1e4c636a02 docs: add section about naming convention of template labels 2025-05-19 01:41:15 +00:00
Vincent Ging Ho Yim
ddd417469e docs/revsets: fix typo 2025-05-17 14:03:22 +00:00
Isaac Corbrey
85d54eb3d8 docs: Don't include unnecessary shebangs
It isn't necessary to include shebangs in scripts passed into
`util exec` since you're already explicitly calling out the shell you'd
like to use. This change removes shebangs from examples for `util exec`
and adds a note below calling this out.
2025-05-17 11:51:07 +00:00
T6
13c6257aac templater: add arithmetic operators 2025-05-16 12:45:09 +00:00
Yuya Nishihara
a9bae8bc91 templater: deprecate CommitId::normal_hex()
If CommitId and ChangeId were separate types in templates, we wouldn't add
CommitId::normal_hex().
2025-05-16 11:12:33 +00:00
Yuya Nishihara
851d25cd68 cli: unify diff format/tool config variables
This allows users to override the external tool set in ~/.jjconfig.toml. The
config variable is renamed to ui.diff-formatter to be consistent with the other
diff/merge editor settings.

--tool=:<format> support will be added separately.

Closes #3327
2025-05-16 00:33:49 +00:00
Yuya Nishihara
dd33f9ae08 cli: git clone: add config to not track default remote bookmark
Since jj operates in detached HEAD state, a tracking bookmark isn't technically
needed in order to check out a commit. I usually employ this and delete
unmanaged local bookmarks after cloning repository. This option will automate
the setup.
2025-05-15 09:08:07 +00:00
Philip Metzger
6cbb21f86f conflicts: document the "same-change rule"
I think its time to finally give our Conflict Algebra rule a term.
This is will make our documentation alot easier, and gives it a name for
new design docs.

All credit goes to @martinvonz for coming up with the term in #4988.
2025-05-14 15:08:29 +00:00
Yuya Nishihara
2d79c6431d templater: introduce newtype to format ref/remote name in revset syntax
This is the last part of the series 02722eae54 "view: port bookmark/tag name
types to RefName/RemoteName." Templater doesn't use these name types internally
because we wouldn't gain much type safety in template language.

The return type of .remote() is changed to Option<RefSymbol>. An empty symbol is
rendered with quotes, so it would be weird if local_bookmark.remote() returned
an empty RefSymbol.
2025-05-13 23:54:47 +00:00
kkoang
f02c02eabc docs: Add support for installing JJ using the winget command. 2025-05-13 05:42:03 +00:00
Yuya Nishihara
cb877a94c1 templater: allow comparison between optional and non-optional values
I'm going to add RefSymbol(String) type to format bookmark/remote name in revset
syntax. Since an empty symbol will be rendered differently from an empty string,
bookmark.remote() -> String will be changed to -> Option<RefSymbol>. Then, we'll
need to add support for comparison between optional and non-optional values.

In template language, method call on None produces an error. If we followed this
rule, comparison would have to be expressed as `opt && opt == lit`. I feel this
would be too verbose, and wouldn't help eliminate user error caused by
unintended comparison between Option<T> and T anyway. So this patch implements
comparison by lifting T to Option<T> implicitly.
2025-05-13 00:18:02 +00:00
kkoang
53272510bf docs: Update tutorial.md using the command in version 0.29.0 2025-05-12 20:41:22 +00:00
Mateus Auler
96a0c4f759 docs: document code to avoid duplicating gerrit change-id
Adapted from:
- https://gist.github.com/thoughtpolice/8f2fd36ae17cd11b8e7bd93a70e31ad6#file-jjconfig-toml-L247
- 28a0e40439/.jjconfig.toml (L150)
2025-05-11 17:00:32 +00:00
Vincent Ging Ho Yim
8c4840135f docs/templates: surround type names with backticks in section headings
In particular, this fixes the section heading for the `List<Trailer>` type. Before this
commit, that heading was rendered incorrectly as 'List type'.
2025-05-11 13:14:36 +00:00
Vincent Ging Ho Yim
d08f19dc3e docs/core_tenets: fix typo 2025-05-10 15:36:46 +00:00
Alper Cugun
0fe7b3a428 docs: Remove deprecated backout command from git table
Change default location for revert as suggested by @emilazy
2025-05-09 15:26:53 +00:00
Michael Pratt
88be1b4c56 docs: clarify commit_trailers deduplication
I spent quite a while confused by the presence of
`if(!trailers.contains_key("Change-Id")` in the `commit_trailers` example. My
thinking was: if `commit_trailers` already performs deduplication, then isn't
this logic useless?

Eventually I realized that the `commit_trailers` deduplication works on the
entire line, not just the key as I'd assumed. (And that makes sense for
trailers like Signed-off-by that can appear more than once.)

I've reworded the `commit_trailers` documentation to try to make this more
clear.
2025-05-08 09:17:56 +00:00
Emily
7bcc5cca8f git: remove git2 feature 2025-05-07 19:29:20 +00:00
Emily
f3de3858ef git: remove git.subprocess setting 2025-05-07 19:29:20 +00:00
Austin Seipp
5017c44deb docs: improve release process tidbits (again)
`heads(tags())` was rather confusing in my repository because I have
a bunch of tags pushed to my fork that are tracked locally. Assuming
that `trunk()` is something like `main@origin` or whatnot, then using
`heads(tags() & ::trunk())` works quite a bit better.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-05-07 17:07:16 +00:00
Nils Koch
deb4f1ba79 docs: update git compatibility docs for commit signing 2025-05-04 22:52:24 +00:00
Nicole Patricia Mazzuca
05fa4bc0a3 docs: add some more info on signing
I was asked about this in Discord, so I wanted to make sure to have the
information available in the docs and not just the code.
2025-05-03 11:27:36 +00:00
Nicole Patricia Mazzuca
6f6496ba83 config: default to XDG config files on macOS
Support existing users with the "legacy" config directory, as well.
This will be deprecated in a latter commit.
2025-05-02 20:05:24 +00:00
Gaëtan Lehmann
2c4a0328f9 templates: add self.trailers().contains_key(key)
as a simpler and more readable alternative to

    self.trailers().filter(|t| t.key() == "Change-Id")
2025-04-29 06:36:12 +00:00
Mateus Auler
968806bc64 templates: implement Commit.trailers() 2025-04-27 18:29:25 +00:00
Ilya Grigoriev
5a735182ac docs conflicts.md: clarify the revert example a bit
Yuya's suggestion from
<https://github.com/jj-vcs/jj/pull/6415#discussion_r2061122640>.

Co-authored-by:  Yuya Nishihara <yuya@tcha.org>
2025-04-27 00:40:27 +00:00
Ilya Grigoriev
1f14f7a0ff docs conflicts.md: fix confusing typo
Fix #6414.
2025-04-27 00:40:27 +00:00
Martin von Zweigbergk
92629ded4c docs: make technical conflicts doc better match our recent thinking
These days, we usually think of conflicts as one base state and series
of diffs between other states. The base state is normally the parent
when rebasing.

Also, we're deprecated `jj backout` in favor of `jj revert`, so let's
use that terminology.
2025-04-25 13:53:28 +00:00
Sam
001801a3b1 cli: add config option for built-in pager's ruler 2025-04-23 03:16:58 +00:00
Benjamin Tan
f9c83541d6 docs: releasing: use gh api --paginate to construct contributor list 2025-04-22 15:03:23 +00:00
George Christou
69135abf5b docs: update meld install command 2025-04-22 00:28:33 +00:00
Vincent Ging Ho Yim
08f9a9af43 docs/contributing: remove explicit enabling of copy button in code snippets 2025-04-21 23:12:43 +00:00
Vincent Ging Ho Yim
f300371398 docs/contributing: add instructions to build the docs for offline distribution 2025-04-21 23:11:21 +00:00
Yuya Nishihara
1525740247 docs: fix copy-paste error in draft_commit_description example 2025-04-21 14:39:47 +00:00
Vincent Ging Ho Yim
24ab60b1c2 docs: split notes on jj commands into new column in Git command table 2025-04-21 00:45:01 +00:00
Vincent Ging Ho Yim
e90727b34d docs: convert Git command table from HTML to YAML
The YAML format is much easier to maintain and allows using Markdown instead of having
to escape symbols such as < and >.
2025-04-21 00:45:01 +00:00
Martin von Zweigbergk
15351a2d92 templates: extract a template alias as hook for default commit description
This makes it easier to override just the default description without
having copy the whole default template (and having to keep it up to
date with new versions).
2025-04-19 05:42:52 +00:00
Vincent Ging Ho Yim
183d4e1882 docs/index: use sentence case consistently for docs page names
Follow-up to 73e87bc.
2025-04-18 22:25:36 +00:00
Josh Steadmon
405331ba62 paid_contributors: sort contributor list
Make it easier to scan the list by sorting it (case-insensitive).
2025-04-18 20:30:59 +00:00
TimerErTim
ae1e831aa6 docs: mention openSUSE installation method 2025-04-17 18:34:12 +00:00
Winter
af60f3d674 cli: deprecate ui.default-description
Closes https://github.com/jj-vcs/jj/issues/6298.
2025-04-17 02:03:48 +00:00
Gaëtan Lehmann
f6e3f38b94 templates: add commonly used trailers
namely Signed-off-by and Change-Id

`format_signed_off_by_trailer` will be formatted properly if the author
name is not set, but will contain the email placeholder if the author
email is not set, as I haven't found a way to make the template
generation fail.

`format_gerrit_change_id_trailer` is based on jj's change id, but it
needed to be padded to reach 40 characters. Zero-padding is kind of
boring so I've used `6a6a6964`, the hexadecimal representation of `jjid`
in ascii.

Because the trailer value runs up to the end of the line, they are
all terminated with a new line. This way it's also convenient to
define these trailers in the `commit_trailers` template:

  [templates]
  commit_trailers = '''
    format_signed_off_by_trailer(self)
    ++ format_gerrit_change_id_trailer(self)
  '''
2025-04-15 05:16:16 +00:00
Winter
f3c4cc2155 cli: duplicate: add setting for templating the new commit descriptions
This allows the customization of the duplicated commit descriptions.

An ideal use case for this is emulating `git cherry-pick -x`, as
illustrated in the tests.
2025-04-13 21:49:47 +00:00
Gaëtan Lehmann
71a0194ad1 describe: add trailer support
Add a new `template.commit_trailer` configuration option. This template
is used to add some trailers to the commit description.

A new trailer paragraph is created if no trailer paragraph is found in
the commit description.
The trailer is not added to the trailer paragraph when the trailer is
already present, or if the commit description is empty.
2025-04-13 20:36:11 +00:00
Nils Koch
fbaa51b4ce revset: add signed function 2025-04-12 14:14:26 +00:00
Martin von Zweigbergk
42bf17936f docs: add a style guide
#5685
2025-04-10 22:01:48 +00:00
Benjamin Brittain
0b6d0a7a75 git_backend: derive the change ID from the git change-id header
When read/writing commits from the git-backend, populate the git commit
header with a backwards hash of the `change-id`. This should enable
preserving change identity across various git remotes assuming a
cooperative git server that doesn't strip the git header.

This feature is behind a `git.write-change-id-header` configuration flag
at least to start.
2025-04-09 16:42:56 +00:00
Philip Metzger
1716b7f8d3 docs: add some more testimonials
This is cobbled together from the "new" appreciation channel and something I saw on the Rust Zulip.
2025-04-08 20:55:09 +00:00