`ui.prompt_password()` already adds ": " to the end of the prompt.
Remove the extra at the (only) callsite, to keep similarity to the above
`terminal_get_pw()`.
A missing newline would cause the following conflict markers to become
invalid when materializing the conflict, so we add a newline to prevent
this from happening. When parsing, if we parsed a conflict at the end of
the file which ended in a newline, we can check whether the file
actually did end in a newline, and then remove the newline if it didn't.
File conflicts have been simplified during materialization since 0.19.0,
so it should be safe to remove support for unsimplified conflicts now.
This will make implementing the next commit easier, since it won't have
to support unsimplified conflicts.
I originally thought we could just reinitialize RepoLoader, but it wasn't
enough. Since LocalWorkingCopy holds Arc<Store>, we need to reinstantiate both
working copy and repo loader.
As I said, I don't have strong feeling about the current behavior, and appears
that "log | head | reverse" is preferred over "log | reverse | head".
"jj evolog" already behaves differently, so I just updated the doc.
Note that the new behavior might be slightly different from git, but nobody
would care. (iirc, in git, topological sorting comes later.)
Closes#5403
Currently, the Git subprocess tests only work on Linux due to a default
path being used for the `git` executable when `$PATH` is unset. This can
break if Git isn't installed at the expected path. Also, I believe it is
currently necessary to set the `$TEST_GIT_EXECUTABLE_PATH` environment
variable on Windows for tests to pass. Instead, we should use the user's
`$PATH` to locate the `git` executable, as well as any other executables
that are needed. This also makes `$TEST_GIT_EXECUTABLE_PATH` no longer
necessary, so it can be removed.
Other links in CHANGELOG.md have the issue number as the text, and the
full URL as a link. They're swapped here, meaning the link points to a
non-existent anchor in the CHANGELOG.md file.
Apparently, Magic Nix Cache will stop working on Feb 1st, because
the underlying APIs are being sunset by GitHub, and there are no open
replacements for it quite yet. Since it's just an optimization, we'll
have to live with it.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Before this commit, both VS Code's "Even better TOML" and `taplo`
reported an error saying `["status","--no-pager"] is not of type
"string"` for
```toml
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json"
ui.default-command = ["status", "--no-pager"]
```
I believe the schema was either invalid or just ignored `oneOf` because
it was trivially satisfied whenever the `type` restriction was
satisfied.
This can be used in order to count the number of added files by
diff.files().filter(..).len(), for example. If we add more advanced fileset
predicates, it can also be expressed as diff("added()").files().len(). The
latter would be cheaper to compute.
For #4154, I'll probably add DiffStats template type. It might be doable by
extending diff.files() method, but I don't think it's good idea to write stats
calculation logic in template language.
Closes#5272
bacon 3.6.0 -> 3.8.0, shows output with nextest 0.9.86
https://github.com/Canop/bacon/issues/280
Add python3 to the devshell to be able to run tools installed with uv
Closes#5217
Motivating use case:
[[--scope]]
--when.command = ["log"]
[--scope.ui]
pager = "less"
This adds a new (optional) field to `--when` config conditions, to
inspect the current command.
`--when.commands` is a list of space-separated values that matches a
space-separated command. To be specific:
--when.command = ["file"] # matches `jj file show`, `jj file list`, etc
--when.command = ["file show"] # matches `jj file show`, but *NOT* `jj file list`
--when.command = ["file", "log"] # matches `jj file` *OR* `jj log` (or subcommand of either)
When both `--when.commands` and `--when.repositories` are set, the
intersection is used.
In some cases, there are non trivial codepaths for fetching multiple
branches explicitly. In particular, it might be the case that fetching
works for n = 2 but not n = 3.
This commit changes a cli test to have 3 remotes and 3 branches, and a
lib test with 3 branches, only one of them succeds.
Fully qualified git refs (e.g., `+refs/head/main:refs/remotes/origin/main`)
are commonly used throughout the git glue code.
It is laborious and error prone to keep parsing refspecs when we need
only a segment of it.
This commits adds a type, `RefSpec`, which does exactly that
The --edit flag forces the editor to be shown, even if it would have
been hidden due to the --no-edit flag or another flag that implies it
(such as --message or --stdin).
I'm going to add "file list" template, and I think it's better to provide a file
path as "path", not "self". This patch also adds some tree value properties
which seemed useful.
Tests will be added later.
This will be used in "file list" template. Option<RepoPath> type isn't
needed for that, but I think it'll appear somewhere in custom diff template.
The path.parent() method is added mainly for testing Option<RepoPath>.
Tests will be added later.
This one is easy, but porting other "jj git remote" sub commands would require
non-trivial work.
The empty [remote "<name>"] case is covered by existing tests.
It's not uncommon to insert new table at a certain path. This could be modelled
as set_table(name, new_table), but the caller might want to merge items with
the existing table if any. This function can be used for both cases.
This was needed in order to migrate fix.tool-command to [fix.tools] table. We
don't have other use cases right now, but there will be something in future.
I had to guess whether to complete all revisions or just mutable ones. I'm
guessing that `-r` is sometimes used with immutable revisions (as part of a
revset, or for creating special-purpose branches), while `-c` is almost always
used to push a mutable revision. We can change it later if my guess is wrong.