Commit graph

1102 commits

Author SHA1 Message Date
Scott Taylor
2ce2a445b0 conflicts: show "noeol" state separately for each side of a diff
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Now that we can put the "from" and "to" sides on separate lines, we can
use the normal "(no terminating newline)" comment on each side
separately. This should also be more clear, since previously the
"(no terminating newline)" comment could possibly be confused for
"(removes terminating newline)".

Before:

```
<<<<<<< conflict 1 of 1
+++++++ rtsqusxu 2768b0b9 "commit A" (no terminating newline)
grapefruit
%%%%%%% diff from: vpxusssl 38d49363 "merge base"
\\\\\\\        to: ysrnknol 7a20f389 "commit B" (adds terminating newline)
-grape
+grape
>>>>>>> conflict 1 of 1 ends
```

After:

```
<<<<<<< conflict 1 of 1
+++++++ rtsqusxu 2768b0b9 "commit A" (no terminating newline)
grapefruit
%%%%%%% diff from: vpxusssl 38d49363 "merge base" (no terminating newline)
\\\\\\\        to: ysrnknol 7a20f389 "commit B"
-grape
+grape
>>>>>>> conflict 1 of 1 ends
```
2025-12-20 17:43:41 +00:00
Scott Taylor
33ad38bfed templates: add "divergent" label to log for divergent changes
It would be good to include the word "divergent" in the log when a
change is divergent, since users are often unsure what's happening when
they see a divergent change, and giving them a term to search for would
be helpful. However, I don't think it looks good to put this label next
to the change ID itself if both are the same color, since it ends up
being hard to distinguish from the change offset at a glance. Also,
putting the label next to the change ID also messes up the alignment of
fields in the log. Therefore, I think it looks better to put the
"divergent" label at the end of the line.

Since divergence and hidden commits are similar, it makes sense for both
labels to be in the same place, so I also moved the hidden label to the
end for consistency.

One downside is that the labels are less obviously connected with the
change ID itself due to them being farther apart. I think this could be
fine, since they are still visually connected by being the same color.
2025-12-20 16:55:51 +00:00
Scott Taylor
144ba766b1 rewrite: add conflict labels for rebased commits
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
An example of rebasing `ysrnknol` onto `rtsqusxu`:

```
<<<<<<< conflict 1 of 1
%%%%%%% diff from: vpxusssl 38d49363 "base" (parents of rebased commit)
\\\\\\\        to: rtsqusxu 2768b0b9 "left" (rebase destination)
-base
+left
+++++++ ysrnknol 7a20f389 "right" (rebased commit)
right
>>>>>>> conflict 1 of 1 ends
```
2025-12-20 04:03:57 +00:00
Scott Taylor
04a91217f5 rewrite: add conflict labels when merging commit trees
An example with parents `rtsqusxu` and `ysrnknol`:

```
<<<<<<< conflict 1 of 1
%%%%%%% diff from: vpxusssl 38d49363 "description of base"
\\\\\\\        to: rtsqusxu 2768b0b9 "description of left"
-base
+left
+++++++ ysrnknol 7a20f389 "description of right"
right
>>>>>>> conflict 1 of 1 ends
```
2025-12-20 04:03:57 +00:00
Scott Taylor
ba73442b2a conflicts: update conflict marker format
Conflict labels will generally start with lowercase change IDs, so
making all of the text lowercase makes it more consistent. I also
removed the "contents of" text, since conflict labels will already be
long enough, and this text doesn't add anything. Similarly, I removed
the "(conflict 1 of 1)" note from the Git conflict markers since Git
doesn't include this information, and including it would result in extra
long lines once we add conflict labels.
2025-12-20 04:03:57 +00:00
Steve Klabnik
97c03ea8a3 docs: clarify that some template parameters require literal strings
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Rename parameter type `String` to `StringLiteral` where methods require
a literal string known at parse time rather than a dynamic expression.
This makes the documentation faithful to the underlying code, which uses
`expect_string_literal()` and reports "Expected string literal" errors.

Add a new `StringLiteral` type section explaining the distinction.

Fixes #7068
2025-12-19 19:57:54 +00:00
Jonathan Hoelzel
537dbc04ea docs: Add myself as paid contributor (under IMC Trading)
The prior commit in this PR was done of my own accord but during work
hours, so adding myself to this list.
2025-12-17 00:30:17 +00:00
Steve Klabnik
ead7a16427 docs: remove non-functional xonsh completion instructions
Related to #8141
2025-12-16 22:02:02 +00:00
Shnatu
4a3c56ef4c paid_contributors: Add kiranani (snatu@google.com) 2025-12-16 20:01:11 +00:00
Scott Taylor
edc578c56b docs: update examples of divergence to include change offsets 2025-12-16 02:02:31 +00:00
Scott Taylor
9be4bcc506 commit_templater: add change_offset() to Commit 2025-12-16 02:02:31 +00:00
Scott Taylor
5df15f60c6 revset: parse change IDs with offset like xyz/2 2025-12-16 02:02:31 +00:00
Steve Klabnik
cfa09ac9c8 docs: remove misleading "See also List type" from ListTemplate
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
This cross-reference was added in 998727266c (March 2023) when
ListTemplate was first documented. At that time, List only had two
methods: .join() and .map(). The reference made some sense since
ListTemplate was the result type of .map() and shared the .join()
method.

However, List has since grown significantly with .len(), .filter(),
.any(), .all(), and Boolean conversion - none of which ListTemplate
supports. ListTemplate still only has .join(). This makes the
cross-reference misleading, as it implies a compatibility that
doesn't exist (unlike List<Trailer> which truly extends List).

Fixes #7951
2025-12-15 17:22:24 +00:00
Yuya Nishihara
b9317da0f8 cli: enable glob string matching globally
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The goal of this change is to unify defaults of string patterns in revsets and
command arguments. Glob is a good default because it's largely the same as exact
matching, and we can easily express substring patterns with globs.

The hint for "jj git fetch -b<glob>" is deleted since exact:<glob> is now
required in order to trigger the error.

This patch also updates help of clone/fetch --branch patterns. Glob and operator
support in refspecs is limited.
2025-12-15 04:27:32 +00:00
Yuya Nishihara
97375fa041 revset: enable glob string matching by default
Follows up c93682f2 "revset: parameterize default string pattern kind, add
config knob".
2025-12-15 04:27:32 +00:00
Anton Älgmyr
840ae9ebf4 templates: Expose conflicted files in the template language
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-12-14 17:11:16 +00:00
Stephen Jennings
4981e364e7 docs: Add document explaining CLI flags 2025-12-14 15:40:56 +00:00
Yuya Nishihara
e921791574 cli: bookmark: add --remote argument to track/untrack, deprecate name@remote
These two are the last commands which don't support logical operators in string
patterns. The old <kind>:<name>@<remote> syntax had various problems including:

 1. substring patterns look weird (e.g. `substring:x@y` means `*x*@*y*`)
 2. cannot express "all but <name> for all remotes" (e.g. `(~gh-pages)@(*)`)

In addition to that, the revset parser doesn't support `<name>@<remote>`
prefixed by `<kind>:`.

This patch introduces separate --remote argument to address these problems. The
default is `glob:*` (or `~git`), so we wouldn't have to specify the remote in
many cases. One caveat is that `jj bookmark track` is not idempotent if there
are multiple remotes:

    # there are two remotes: origin and upstream,
    # and only foo@origin exists
    $ jj bookmark track foo
    # tracks foo@origin and creates new local bookmark foo
    $ jj bookmark track foo
    # tracks absent foo@upstream as we now have a local bookmark

This is wild. We might want to add a flag or a new command to track absent
remote bookmarks to push.

"Unmatched names" warnings are now emitted for bookmark and remote names
separately. To keep the implementation simple, the search space isn't restricted
by the other parameter. For example, "jj bookmark track foo --remote=bar" won't
show a warning if "foo" exists locally or in any remote.

Closes #4260
2025-12-13 01:32:49 +00:00
Yuya Nishihara
2f9041b842 diff: reduce intensity of context line numbers in color-words diffs
This will help notice small hunks in inlined diff lines. Not all terminals would
support "dim" attribute, but I think that's okay since the diff output should be
readable with/without this change.

Closes #5140
2025-12-13 00:56:55 +00:00
Yuya Nishihara
2ff13a9aae formatter: add support for "dim" attribute
Handling of dim and bold is a bit complicated because these two attributes
cannot be unset individually. I think NormalIntensity will work for resetting
both bold and dim, but I don't have expertise on terminal implementations. So
this patch applies the same workaround as bold to dim.
2025-12-13 00:56:55 +00:00
Steve Klabnik
c8b89ad516 docs: improve profiling documentation
Fixes #1941

I'm including this in the contributing.md rather than in docs/technical because
it's not particularly long, and there's already some information there.
2025-12-12 17:27:10 +00:00
Steve Klabnik
67f00aa0a9 docs: add nix development instructions
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Fixes #1435
2025-12-11 22:06:21 +00:00
Julian Howes
998c8f53d1 docs: fix typo 2025-12-11 11:02:14 +00:00
大鳥市
373857c044 docs: Update paid_contributors.md to add finque@google.com 2025-12-10 21:12:27 +00:00
Yuya Nishihara
9620b00d95 revset, templater: deprecate git_head() and git_refs() functions
While these two are stored in view objects, we intentionally ignore them when
undoing. This means that these fields don't have to be tracked by
view/operation. I think we can move them away to GitBackend-specific data.

We could provide git_head()/git_refs() that load data from GitBackend, but I
don't think these template/revset functions are useful. I've never used them
except for the git_head() template function, and its use case was to see whether
the repository is colocated or not.
2025-12-10 14:26:47 +00:00
xtqqczze
f357791541 docs: fix MD012 markdown lint
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
[MD012](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md): Multiple consecutive blank lines
2025-12-09 07:26:38 +00:00
xtqqczze
a88b119e4d docs: fix MD031 markdown lint
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
[MD031/blanks-around-fences](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md) : Fenced code blocks should be surrounded by blank lines
2025-12-08 23:58:53 +00:00
Shaoxuan (Max) Yuan
2bd0543684 docs: add ffyuanda to paid_contributors.md 2025-12-08 23:58:33 +00:00
Steve Klabnik
7da170d53f docs: mention ?? means 'divergence'
While divergence is talked about in the documentation, few places actually
mention how divergent changes are displayed. I've added such notes to the help
out put of `jj log`, the glossary, and added an example to the guide we have on
divergence.

Fixes #6365
2025-12-08 21:09:51 +00:00
Ian Wrzesinski
bcfd5c977c config: Add "exec-bit-change" setting for overriding policy on Unix 2025-12-04 17:32:40 +00:00
Martin von Zweigbergk
70fd8f7697 release: 0.36.0 2025-12-04 06:23:34 +00:00
Matt Stark
e698b52f2b design: Create a design doc for secure configuration for jj
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-12-03 22:06:37 +00:00
Yuya Nishihara
26faf46dc7 cli: migrate "git push --bookmark" to parse_union_name_patterns() 2025-12-03 08:12:58 +00:00
Joseph Lou
5286b2e0f5 docs: Fix remotes.<remote> config documentation
Fixed typos in the examples (`remote.<remote>` vs. `remotes.<remote>`),
and fixed some broken links.
2025-12-03 07:27:57 +00:00
Tommi Virtanen
185c65482b docs: GitBackend uses gitoxide not git2
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
See #5548 for git2 deprecation.
2025-12-03 05:55:42 +00:00
Philip Metzger
ae0ff17c25 docs: delete a dead TODO and sort some links
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Delete the dead reference to bwb's cultivate which no longer is actively worked on since
in the mean time ersc was founded. Also sort the links in the doc.
2025-12-02 21:23:14 +00:00
Velociraptor115
c1b7a6ea52 template: Add support for per-file diff stats
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The primary benefit of this change is that it splits
"lines_added()" and "lines_removed()" into separate fields,
which will be useful for tools.

Many tools use "status()", "lines_added()", "lines_removed()",
"source()" and "target()" to show useful information about
every file modified in a commit.

The existing diff stats summary shows only the combined 
number of lines modified, along with a "percentage" representation
of line additions vs. deletions. This is lossy and not
useful for tools, since it is impossible to arrive at
the exact number of lines added and deleted.
2025-12-02 12:59:00 +00:00
Hubert Lefevre
42a713b5e4 docs: Move jj fix configuration documentation to config.md
In order to write config settings of tools for jj fix, you needed
information that were split in the `jj fix --help` text and
`jj help -k config` (or the respective web-pages).

Move every bit of information that is important to know to write
`jj fix` configurations in the config page. This avoid to have to
maintain the information up-to-date in two places.

Organize the help text of `jj fix` with several chapters.
2025-12-01 08:57:35 +00:00
Yuya Nishihara
4518bd14b4 docs: add example of using $PAGER variable if set
#8159
2025-12-01 01:13:19 +00:00
Martin von Zweigbergk
5215a643b3 glossary: avoid saying "the latest version of a revision"
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Since we use "revision" and "commit" as synonyms, it's confusing to
say that "the latest version of revision".

Closes #7912.
2025-11-30 18:49:04 +00:00
Stephen Jennings
eb64739ede docs: Add Jujutsu for Git experts
Some checks failed
binaries / Build binary artifacts (push) Has been cancelled
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
2025-11-28 06:08:41 +00:00
QingyaoLin
f3a749fbff docs: update nushell completion
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-26 15:20:37 +00:00
Steve Klabnik
5b3aa51140 docs: jj-vcs.github.io -> jj-vcs.dev
As a follow-up to #8115, this moves all references in the codebase to use the new website.

I didn't update the older CHANGELOG entries because I figured they're intended
to be immutable.
2025-11-26 00:36:39 +00:00
Joseph Lou
0563f4f559 docs: Add myself as a paid contributor 2025-11-25 21:28:19 +00:00
Martin von Zweigbergk
7f28aad17d docs: fix some typos
Most of these were noticed by @omahs (thanks). I also fixed another
instance of "the the".
2025-11-25 20:27:59 +00:00
Gaëtan Lehmann
00da178ed0 doc: use metaedit to generate a new change-id
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-25 07:43:16 +00:00
Joseph Lou
0b8ecd5c63 template: Add join() function
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Sometimes it's useful to add a separator between every argument, even if
it's empty.
2025-11-24 15:47:24 +00:00
Vincent Ging Ho Yim
bdd0302b11 docs/FAQ: fix Markdown heading level 2025-11-24 15:35:20 +00:00
Yuya Nishihara
c93682f218 revset: parameterize default string pattern kind, add config knob
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Glob patterns will be enabled by default globally. Since this will be a big
breaking change in revsets, this patch adds a config knob to turn the new
default on/off.
2025-11-24 01:39:32 +00:00
Yuya Nishihara
3f88ea78f1 cli: use revset parser to parse bookmark/tag list patterns
These commands are easy ones. The other commands error out if one of the
patterns doesn't match anything. I'll make them warn only exact patterns instead
to keep the implementation simple. I'll also add warnings to these list
commands.
2025-11-23 03:00:12 +00:00