748 Commits

Author SHA1 Message Date
Andrew Gilbert
5dac0ef4d1 docs templates: add link to templates toml file 2025-02-17 21:02:23 +00:00
Alain Leufroy
fa3254b4a7 templates: add hook points for users to customize the default operation id
Same as `format_short_change_id`.

We can't use `format_short_id` because `operation.id()` does not have `shortest()` method.
2025-02-17 09:08:51 +00:00
maan2003
ec6f8278fd signing: allow specifying sign behavior 2025-02-16 05:56:52 +00:00
Yuya Nishihara
4ec22dde38 templater: port annotation line content to template
I originally thought we would have to add BString template type first, but we
can use opaque Template type instead.
2025-02-15 11:07:17 +00:00
Bryce Berger
3bc111e60e annotate: make AnnotationLine template type
Allows:
* self.commit()
* self.line_number()
* self.first_line_in_hunk()

Certain pagers (like `delta`), when used for `git blame`, only show the
commit information for the first line in a hunk. This would be a nice
addition to `jj file annotate`.

`jj file annotate` already uses a template to control the rendering of
commit information --- `templates.annotate_commit_summary`. Instead of
a custom CLI flag, the tools necessary to do this should be available in
the template language.

If `1 % 2` or `1.is_even()` was available in the template language, this
would also allow alternating colors (using `raw_escape_sequence`).

Example:

```toml
[templates]
# only show commit info for the first line of each hunk
annotate_commit_summary = '''
if(first_line_in_hunk,
  show_commit_info(commit),
  pad_end(20, " "),
)
'''
```
2025-02-15 02:34:38 +00:00
Yuya Nishihara
0d2becbac3 templater: add stringify(x) function to call string methods on template
It's also useful to remove color labels from the inner template.
2025-02-14 00:54:03 +00:00
Yuya Nishihara
78f08d9e6c docs: use single-quoted template string in JSON example
It's easier to parse than \".
2025-02-14 00:54:03 +00:00
Martin von Zweigbergk
5e694ea571 docs: record contributors whose employer pays for contributions
This adds a record of all contributing employees of companies who pay
for contributions. The purpose is to help make possible conflicts of
interest easier to spot. As far as we know, only Google currently pays
right now.
2025-02-13 21:52:02 +00:00
Ilya Grigoriev
d79c7a0dd5 mkdocs: update mkdocs-material and mkdocs-include-markdown-plugin
It's been about five months, and it seems best to occasionally try
updating. Let's see if this causes any problems.

There was also a minor breaking change to
`mkdocs-include-markdown-plugin`, I added an option to keep
the old behavior (which seems nice in this case).

To do these kinds of updates, `uv tree --outdated` is useful.
2025-02-13 17:30:21 +00:00
Matthew Davidson
204cffe386 Remove broken Sublime LSP TOML reference in config.md
Removes nonexistent Sublime TOML LSP server link. Since I wasn't able to find an alternative, I removed the Sublime bit entirely.
2025-02-13 04:44:39 +00:00
hkalbasi
272955f4fe templater: add .escape_json method to string 2025-02-12 22:17:30 +00:00
David Rieber
dd73b5ab7d bookmarks: First step to make target revision a required argument to bookmark create/move/set.
With this change a warning is shown if the user does not explicitly specify the target revision, but the behavior is unchanged (it still defaults to the working copy).
In the future the warning will be turned into an error. In other words, it will be required to specify target revision.

The bulk of the changes here are to prepare tests for the upcoming change, to make the transition easier.

For additional details please see:
* https://github.com/jj-vcs/jj/issues/5374
* https://github.com/jj-vcs/jj/discussions/5363
2025-02-11 22:21:19 +00:00
Emily
77f54a267e git: enable subprocessing by default
Given the previously‐stated intention of making this default
for the 0.27 release, prepare for that decision ahead of time by
enabling subprocessing by default on trunk. This will help surface
any regressions and workflow incompatibilities and therefore give
us more information to decide whether to keep or revert this commit,
without inconveniencing any users who haven’t already opted in to
the bleeding edge.

Please feel free to revert without hesitation if any major issues
arise; this is not intended as a strong commitment to enable this
option for the next stable release if it turns out to not be ready. In
that case, it’s better that we learn that early on in the cycle,
rather than having to revert at the last minute or, worse, cutting
a stable release that we later find contains a serious regression.
2025-02-10 22:10:22 +00:00
Austin Seipp
02500e5248 meta: add initial GOVERNANCE.md
This is the result of a lot of back and forth, the weekly efforts of the
governance working group, consisting of:

- Martin von Zweigbergk (martinvonz)
- Waleed Khan (arxanas)
- Emily Shaffer (nasamuffin)
- Austin Seipp (thoughtpolice; yours truly)

Many thanks as well to emeritus member Khionu Sybiern, who helped kickstart this
whole process.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-02-10 17:39:34 +00:00
Martin von Zweigbergk
d135e04f7d docs: undo another mistaken "branch->bookmark" change 2025-02-10 17:24:32 +00:00
Martin von Zweigbergk
1e25101cea
cli: status: replace "is clean" by "has no changes"
"The working copy has no changes" seems much easier to understand for
new users. Thanks to @Wilfred for the suggestion.
2025-02-10 08:01:50 -08:00
Martin von Zweigbergk
65dc6750e0 docs: move Git command table to a separate page
The table can be easy to miss in its current location.
2025-02-10 15:29:32 +00:00
Martin von Zweigbergk
ac55f52292 docs: swap "git" and "jj" columns in command equivalence table
The table is probably mostly used by users switching from Git, so it
makes sense to have the `git` command on the left side.
2025-02-10 15:29:32 +00:00
Martin von Zweigbergk
0cc1a17e78 faq: fix quoting of git.private-commits example
The example became incorrect when `jj config set` stopped promoting
values with apostrophes to strings in 3f115cb. Use a TOML literal
string to fix it.
2025-02-09 17:51:14 +00:00
Ilya Grigoriev
f543d24244 mkdocs: get rid of SITE_URL_FOR_MKDOCS
The bug that made it somewhat useful is hopefully fixed now. I
documented the issue in case it reappears.
2025-02-07 20:44:59 +00:00
Ilya Grigoriev
1d95bd6b55 docs and readme: add the new jj logo
It's half-sized (432x432 instead of 864x864) for size and
compressed with `pngquant` (difference not visible with
my eyes).
2025-02-07 20:40:23 +00:00
Ilya Grigoriev
2da0b73c22 favicon: make corners round, make birds a little larger
Also compressed with `pngquant` (I cannot notice the difference
before and after)

Followup to b3099b7
2025-02-07 20:40:12 +00:00
Josh Steadmon
975e1e1e24 templater: add optional ellipsis arg to truncate template functions
If an ellipsis arg is given to the truncate_* template functions, append (or
prepend) the ellipsis when the template content is truncated to fit the maximum
width.

Fixes #5085.
2025-02-06 11:34:33 -08:00
Yuya Nishihara
6f04f50a80 docs: add query example to fetch contributors from GitHub
I don't know if this is the correct way of using GitHub API, but it works.
2025-02-06 13:57:48 +00:00
Roman Timushev
6bd81c5800 docs: Add git merge to the git command equivalence table
People moving from git may want to know what is the jj equivalent of git merge.
2025-02-06 13:53:25 +00:00
Jonathan Gilchrist
9cd61ece4e docs: Split out commit guidelines into their own section
The commit guidelines feel like they're relevant before documentation
about the code review process - they could conceivably apply while
developing a change.

These often seem to get missed and raised during reviews - giving them
their own section may increase visibility.
2025-02-05 22:04:22 +00:00
Vincent Ging Ho Yim
8f15f7eae9 docs/install-and-setup: clarify wording re: binaries of latest GitHub release 2025-02-05 21:31:47 +00:00
Vincent Ging Ho Yim
0c12636981 docs/install-and-setup: move 'prerelease version' sentence to after 'Cargo Binstall' section
It seems that in 38daa9a the 'Cargo Binstall' section should have been inserted above the 'prelease version' sentence instead.
2025-02-05 21:31:21 +00:00
Vincent Ging Ho Yim
539cd75f90 docs: use styled admonition blocks for warnings
This is consistent with the rest of the docs.
2025-02-05 23:09:02 +11:00
Martin von Zweigbergk
f67373368e docs: describe how to do a release 2025-02-04 22:05:24 -08:00
Ilya Grigoriev
b95628c398 built-in pager: document key bindings
I mostly focused on:

- keys for absolute beginners
- keys for features for which it's not obvious they
  *have* a key binding
2025-02-05 02:38:11 +00:00
Ilya Grigoriev
f60014f3ee built-in pager: allow configuring streampager options
This also changes the default to be closer to `less -FRX`. Since this
default last changed very recently in #4203, I didn't mention this in
the Changelog.

As discussed in https://github.com/jj-vcs/jj/pull/4203#discussion_r1914372214

I initially kept the config closer to streampager's (see
https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but
then decided to make it more generic, smaller, and hopefully easier to
understand.
2025-02-05 02:38:11 +00:00
Yuya Nishihara
891fe085a6 templater: add DiffStats type to provide raw stats values
I originally considered adding `stats() -> DiffStats` which returns an
unprintable object, with deprecation of `.stat(width)` in favor of
`.stats().<method_to_render>(width)`. However, I couldn't find a good name for
the rendering function. This patch instead made the width parameter optional. I
think that's good because template language doesn't have to be overly strict.

Closes #4154
2025-02-05 00:31:16 +00:00
Josh Steadmon
227eccefdb templater: add pad_centered template function
Add a new pad_center function that centers content within a minimum
width. If an odd number of fill characters is required, the trailing
fill will be one character longer than the leading fill.

Fixes #5066.
2025-02-04 18:16:20 +00:00
Vincent Ging Ho Yim
e995f7eec2 docs/windows: remove unused link
The only usage of this link was removed in 2d0b715.
2025-02-04 12:59:26 +00:00
Vincent Ging Ho Yim
de3c90ac90 docs/install-and-setup: replace linuxbrew with Homebrew
The name `Linuxbrew` is no longer used since Homebrew 2.0.0:
https://brew.sh/2019/02/02/homebrew-2.0.0/
2025-02-04 12:42:21 +00:00
Vincent Ging Ho Yim
c3661d389c docs/windows: link to Git docs on core.autocrlf setting 2025-02-04 12:09:57 +00:00
Vincent Ging Ho Yim
6ff196a191 docs/windows: clarify that no CRLF-to-LF conversion is done by jj on committing
The original description suggests jj somehow converts line endings, when in fact all it
does is commit files as is (as described in the previous paragraph), whether the line
endings are CRLF or LF.
2025-02-04 12:09:57 +00:00
Vincent Ging Ho Yim
ebac2b8a4e docs: add language identifiers to code blocks to improve syntax highlighting 2025-02-03 13:43:24 +00:00
Vincent Ging Ho Yim
5fcd639ea4 docs: remove references to jj amend
`jj amend` is discouraged and no longer a visible alias of `jj squash` since 6d78d92. This
is the only remaining occurrence of it in the docs. We should recommend using `jj
squash` directly instead.
2025-02-03 13:00:51 +00:00
Philip Metzger
f31abfd915 docs: Update the contributing docs to mention the new contributors team
I hope this makes the procedure clearer to new contributors like jakobhellerman.
2025-02-02 16:11:10 +00:00
Martin von Zweigbergk
b3099b7b67 docs: add new logo as favicon 2025-02-01 22:43:55 +00:00
Angel Ezquerra
7c7486678e docs: update Sapling comparison logs 2025-02-01 16:50:53 +00:00
Scott Taylor
66808e5dc1 conflicts: use clearer wording for missing newline comment
The current comment uses `[noeol]`, which can be difficult to
understand. In this commit, the brackets are changed to parentheses to
make it clear that there is no semantic meaning to the comment, and the
wording is changed to be more clear to the user.
2025-01-31 23:38:42 +00:00
Antoine Martin
c2acc49be5 docs: document the ui.movement.edit config option
This option was introduced in #4283, but was not documented apart from
`prev` and `next`'s help text on the --edit/--no-edit flags.
2025-01-31 23:10:34 +00:00
Martin von Zweigbergk
faa689a736 contributing.md: describe how to configure jj fix to run rustfmt 2025-01-30 19:14:43 +00:00
Scott Taylor
95df920070 docs: explain [noeol] conflict marker comment
The meaning of `[noeol]` might not be immediately clear to a user, so it
would be good to document it on our documentation page for conflicts. We
may also want to improve the conflict marker comments we use for this
case in the future (possibly after receiving user feedback).
2025-01-29 23:49:02 +00:00
Josh Steadmon
fb4d796cc6 docs: point to jj-vcs for Nix install instructions 2025-01-29 22:03:16 +00:00
Jonathan Frere
11fbbf6ad4 docs: fix typo in templating language example 2025-01-28 17:42:12 +00:00
Bryce Berger
88d3b52081 docs: fix typo '--when.command' -> '--when.commands' 2025-01-28 00:46:54 +00:00