8596 Commits

Author SHA1 Message Date
Yuya Nishihara
569a405cea tests: port test_git_fetch.rs to TestWorkDir API 2025-03-21 01:19:20 +00:00
Yuya Nishihara
64f8661f0f tests: port test_git_colocated.rs to TestWorkDir API 2025-03-21 01:19:20 +00:00
Yuya Nishihara
a36bf18a57 tests: port test_git_clone.rs to TestWorkDir API
In test_git_clone.rs, it's common to execute "jj git clone" or do file operation
at the root directory. This patch adds root_dir: &TestWorkDir references for
that reason. We might want to somehow merge root_dir and test_env later.
2025-03-21 01:19:20 +00:00
Austin Seipp
2c074702e9 github: bump binaries timeout limit
Like the CI runners, I've occasionally seen spikes where binary builds
on 'main' were failing. Bump a little bit to avoid that.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-03-20 23:04:20 +00:00
Austin Seipp
fc8de6006b github: bump timeout to 20 minutes
We're well under the 15 minute limit at this point at the p90 case, but it
seems like the p99 build tends to run into ~10minute spikes due to underlying
runner anomalies (oversaturation?)

Let's go ahead and use a timeout of 20 minutes to give it a little more slack.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-03-20 23:04:20 +00:00
Austin Seipp
4b28aaa8c6 Back out "github: only run dependabot workflow on dependabot/** branches"
This might be the cause of dependabot PRs not having automerge. Let's
just revert it and see what happens when the next PRs roll in.

This backs out commit 47cd10669de28ecc36f0d7dbbb9964945124b730.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-03-20 19:10:45 +00:00
dependabot[bot]
d83cc1d97e cargo: bump the cargo-dependencies group with 2 updates
Bumps the cargo-dependencies group with 2 updates: [clap_complete](https://github.com/clap-rs/clap) and [tempfile](https://github.com/Stebalien/tempfile).


Updates `clap_complete` from 4.5.46 to 4.5.47
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.46...clap_complete-v4.5.47)

Updates `tempfile` from 3.19.0 to 3.19.1
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.19.0...v3.19.1)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 17:48:20 +00:00
dependabot[bot]
71e225ad0c github: bump the github-dependencies group with 2 updates
Bumps the github-dependencies group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `actions/upload-artifact` from 4.6.1 to 4.6.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](4cec3d8aa0...ea165f8d65)

Updates `taiki-e/install-action` from 2.49.30 to 2.49.32
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](37bdc826ea...351cce3d3a)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 17:20:15 +00:00
Caleb White
680c41c30f signing: add gpgsm backend
The adds support for PKCS#12 certificates through the `gpgsm` backend.

Closes #5856
2025-03-20 17:01:39 +00:00
Raphael Borun Das Gupta
d1242635c6 docs: fix spelling of «NixOS»
The name «NixOS» doesn't have a space in it.
2025-03-19 22:46:34 +00:00
Fedor Sheremetyev
364ece09e0 signing: Don't show console on Windows
When used inside GUI application, enabling GPG or SSH signing causes console window to appear temporarily.

std::process::Command needs special flags to prevent that. More details: https://stackoverflow.com/a/60958956
2025-03-19 18:40:16 +00:00
Fedor Sheremetyev
a028e4a03a git: Don't show console on Windows
When used inside GUI application, git.subprocess=true option causes console window to appear temporarily.

std::process::Command needs special flags to prevent that. More details: https://stackoverflow.com/a/60958956
2025-03-19 18:40:16 +00:00
Martin von Zweigbergk
bdbb7afbbb protos: finish local_store->simple_store migration from f8ab8a0e 2025-03-19 17:32:02 +00:00
dependabot[bot]
abd6b22e92 github: bump github/codeql-action in the github-dependencies group
Bumps the github-dependencies group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.11 to 3.28.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bb031afdd...5f8171a638)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-19 16:26:37 +00:00
Yuya Nishihara
9f867b6fac tests: port test_fix_command.rs to TestWorkDir API 2025-03-19 14:52:52 +00:00
Yuya Nishihara
602799afae tests: inline init_with_fake_formatter() to callers 2025-03-19 14:52:52 +00:00
Yuya Nishihara
5647113cbd tests: extract helper that configures fake "fix" formatter 2025-03-19 14:52:52 +00:00
Yuya Nishihara
1769b14995 tests: port test_file_track_untrack_commands.rs to TestWorkDir API 2025-03-19 14:52:52 +00:00
Yuya Nishihara
6f31ba9042 cli: git-push: use RemoteRefSymbol to format and pass name@remote around
This ensures that remote symbols are printed with quoting as needed. Local
bookmark names aren't quoted, which will be fixed separately by introducing
RefName(str) newtype.
2025-03-19 14:28:56 +00:00
Yuya Nishihara
8ae605703e cli: git-push: rename bookmark name/remote variables, bind reference
I'm going to replace (name, remote) pair with RemoteRefSymbol. The underlying
name types will also be changed to RefName/RemoteName newtypes.
2025-03-19 14:28:56 +00:00
Emily
8052b62f2e github: use native builder for x86 macOS
This shaves over 3½ minutes off the tests, taking this from the
slowest job to faster than Windows again. The macOS 13 builders
presumably won’t be around forever, and the newer free builders are
all Apple Silicon, but this is an easy substantial improvement for now.
2025-03-19 14:07:02 +00:00
Yuya Nishihara
f37f927bc2 cli: abandon: remove --summary flag, just print elided list
AFAICT, this option was needed when we're going to abandon hundreds of commits.
However, I typically notice that I had to use --summary to suppress the output
after the fact. Since the list is now truncated up to 10 commits, I don't think
the --summary flag is useful anymore. This patch also removes the special case
for 1 item, which existed primarily for overriding --summary.
2025-03-19 05:32:26 +00:00
Yuya Nishihara
976f3585e1 cli: truncate list of abandoned/created/updated commits
The choice of the upper limit is arbitrary. We use 5 in "multiple revisions"
error, but I feel 5 would be too small for "jj absorb", where the stack of
mutable commits may be ~10, but wouldn't likely be ~100s.
2025-03-19 05:32:26 +00:00
Yuya Nishihara
f07203cb3b cli: extract helper that prints list of indented commit summary 2025-03-19 05:32:26 +00:00
Yuya Nishihara
3b083f914c tests: port test_file_show_command.rs to TestWorkDir API 2025-03-19 01:47:00 +00:00
Yuya Nishihara
9e04e60594 tests: port test_file_chmod_command.rs to TestWorkDir API 2025-03-19 01:47:00 +00:00
Yuya Nishihara
ae5e717d4e tests: port test_file_annotate_command.rs to TestWorkDir API 2025-03-19 01:47:00 +00:00
Yuya Nishihara
bf53953c46 tests: port test_evolog_command.rs to TestWorkDir API 2025-03-19 01:47:00 +00:00
Yuya Nishihara
4f192d0162 tests: port test_edit_command.rs to TestWorkDir API 2025-03-19 01:47:00 +00:00
Yuya Nishihara
082602f2da tests: port test_duplicate_command.rs to TestWorkDir API 2025-03-19 01:47:00 +00:00
Emily
fbb14a1b2f github: use the D: drive on Windows 2025-03-19 01:23:58 +00:00
dependabot[bot]
be432750bd github: bump the github-dependencies group with 2 updates
Updates the requirements on [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) and [taiki-e/install-action](https://github.com/taiki-e/install-action) to permit the latest version.

Updates `dtolnay/rust-toolchain` to 888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](888c2e1ea6)

Updates `taiki-e/install-action` from 2.49.24 to 2.49.29
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](0f58b6a196...62730e3d4f)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-type: direct:production
  dependency-group: github-dependencies
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 20:50:16 +00:00
dependabot[bot]
f6237f07fd cargo: bump the cargo-dependencies group with 3 updates
Bumps the cargo-dependencies group with 3 updates: [async-trait](https://github.com/dtolnay/async-trait), [git2](https://github.com/rust-lang/git2-rs) and [rustix](https://github.com/bytecodealliance/rustix).


Updates `async-trait` from 0.1.87 to 0.1.88
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.87...0.1.88)

Updates `git2` from 0.20.0 to 0.20.1
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.20.0...git2-0.20.1)

Updates `rustix` from 1.0.2 to 1.0.3
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGES.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 16:27:53 +00:00
Yuya Nishihara
322c9951cf ui: do not pass empty choice input to parse function
Since prompt_choice_with() is now public, it should handle the default value
more consistently. parse() shouldn't be a function that can potentially feed a
default value.

We no longer print "unrecognized response" on empty input. I think this is
correct because an empty input is noop.
2025-03-18 15:43:43 +00:00
Yuya Nishihara
c2c2196b14 cli: split name/email not configured message to warning and hint
We usually print a short error message plus detailed hints.
2025-03-18 14:35:54 +00:00
Yuya Nishihara
b9e88be191 cli: extract common formatting function for updated working-copy stats
It's not important to print the parent commits on update-stale, but there should
be no reason to deviate the output formatting.
2025-03-18 14:35:54 +00:00
Yuya Nishihara
ccf927e1d8 cli: pass CheckoutStats to "print" function by reference 2025-03-18 14:35:54 +00:00
Yuya Nishihara
1a4d8dbbf4 ui: reimplement prompt_yes_no() by using prompt_choice_with()
It was odd that uppercase "Y"/"N" wasn't accepted.
2025-03-18 11:17:34 +00:00
Yuya Nishihara
083292d198 ui: extract prompt_choice_with(..callback)
I think "jj next/prev" prompt can also support selection by change ID prefix.
Maybe we can also add ui.prompt_choice_range(prompt, range, default) if that's
common?
2025-03-18 11:17:34 +00:00
Vincent Ging Ho Yim
7e1433a333 docs: fix missed rename of LocalBackend to SimpleBackend
This is a follow-up to f8ab8a0e.
2025-03-18 06:52:00 +00:00
Vincent Ging Ho Yim
a523503dbc docs: update types diagram to reflect rename of LocalBackend to SimpleBackend
This is a follow-up to f8ab8a0e.
2025-03-18 06:52:00 +00:00
Ilya Grigoriev
2a4b2dedf0 simple backend: document the lack of fetching and pushing
This is barely worth doing, but since I did it once...

I feel that some people might treat the simple backend as an easter egg, and
this will help them know what to expect.
2025-03-18 06:38:18 +00:00
Ilya Grigoriev
659325f9c3 cli git fetch: stop tracing the arguments of the outer function
The important arguments are traced in the inner function.

Previously:

```
2025-03-18T05:01:44.714692Z DEBUG run_command:cmd_git_fetch{args=GitFetchArgs { branch: [Exact("main"), Exact("master"), Glob(GlobPattern("gh-readonly-queue*")), Glob(GlobPattern("ig/*"))], remotes: [Exact("upstream")], all_remotes: false }}:fetch{remote_name="upstream" branch_names=[Exact("main"), Exact("master"), Glob(GlobPattern("gh-readonly-queue*")), Glob(GlobPattern("ig/*"))] depth=None}: jj_lib::git_subprocess: spawning a git subprocess cmd=LC_ALL="C" "git" "--git-dir" "/Users/ilyagr/dev/jj/.git" "branch" "--remotes" "--delete" "--" "upstream/master"
```

Now:

```
2025-03-18T05:06:29.573444Z DEBUG run_command:cmd_git_fetch:fetch{remote_name="upstream" branch_names=[Exact("main"), Exact("master"), Glob(GlobPattern("gh-readonly-queue*")), Glob(GlobPattern("ig/*"))] depth=None}: jj_lib::git_subprocess: spawning a git subprocess cmd=LC_ALL="C" "git" "--git-dir" "/Users/ilyagr/dev/jj/.git" "branch" "--remotes" "--delete" "--" "upstream/master"
```
2025-03-18 06:02:05 +00:00
Ilya Grigoriev
1247aaf7f0 lib str_utils: make debug output for Glob StringPatterns more concise
For example, we'll have `Glob(GlobPattern("ig/*"))` instead of the
former

```
Glob(Pattern { original: "ig/*", tokens: [ Char( 'i', ), Char( 'g', ), Char( '/', ), AnySequence, ], is_recursive: false,
})
```
2025-03-18 06:02:05 +00:00
Yuya Nishihara
be4cb847fa repo: unblock loading of simple backend
This removes warning about unused SimpleBackend on non-dev build. Since
Workspace::init_simple() isn't feature-gated, it doesn't make sense to disable
the backend loading.
2025-03-18 05:37:12 +00:00
Baltasar Dinis
837eee90be git: add more targetted debug logging for subprocess code
In recent bugs, it's been really hard to triage the behaviour from the
existing debug logs.

In particular, there have been situations where the `git` command is not
enough to triage, because the bug stems from a particular
environment/config issue. Moreover, these bugs are either transient, and
as such hard to replicate, or they only manifest when spawning `git`
from `jj` (and as such re-running the `git` command does not yield
useful information).

In those cases, seeing what the subprocessing code is seeing becomes
very much useful. This commit adds some debug logging to help with this
problem, by logging some parts of the `git(1)` output and the config.
2025-03-18 03:27:05 +00:00
Emily
d9c3ffa022 github: revert the timeout to 15 minutes 2025-03-18 02:22:47 +00:00
Emily
3ad42b8f15 github: use faster linkers in CI
This shaves off something like 20 to 40 seconds for Linux. It’s
seemingly within the margin of error for Windows, so not sure if
we’ll want to keep it there.
2025-03-18 02:22:47 +00:00
Emily
5d48339165 github: only pass --target to Cargo when necessary 2025-03-18 02:22:47 +00:00
Emily
acd8ecf9f2 github: move CARGO_* CI variables into Cargo configuration
`incremental` is unnecessary since the `rust-toolchain` action
already sets the environment variable, but probably harmless for
future‐proofing.
2025-03-18 02:22:47 +00:00