8965 Commits

Author SHA1 Message Date
Emily
97c6fb979b changelog: add missing release highlights section
It would be tragic if 0.29 didn’t have any of these.
2025-04-05 07:30:10 +00:00
Waleed Khan
3aac8d21e6 release: 0.28.1 v0.28.1 2025-04-05 03:45:18 +00:00
Ilya Grigoriev
bedfb1ff51 tests: make git push --named tests demo differences in subprocess and libgit2 logic
Follows up on https://github.com/jj-vcs/jj/pull/5698 and
https://github.com/jj-vcs/jj/pull/6236.

The behavior of `--named` in corner cases differs. This wasn't detected
in #5698 because of a bug in the test that was fixed in #6236. This
commit better illustrates the more important case where the behavior is
the same, and the less important case where it differs.
2025-04-05 03:18:36 +00:00
Ilya Grigoriev
bd3cc7828a tests: add one more commit to git push --named test
Makes the diff in the following commit simpler.
2025-04-05 03:18:36 +00:00
Ilya Grigoriev
91e2ce69dc github: show counts and allow offline counting for dependency-counting check
Follow-up to b1bb5e1

This creates a `.github/scripts/count-cargo-lock-packages` script to
count packages with our methodology that one can run outside CI.

I also renamed the check so that it's clearer what it does.
2025-04-05 02:21:17 +00:00
Aleksey Kuznetsov
29f24ad2d8 docs: Mention Helix with taplo for config.toml validation
Not sure if Helix is considered popular but I thought
it should be mentioned anyway :)
2025-04-04 21:19:45 +00:00
Austin Seipp
b1bb5e1cf9 github: ward off future dependency bloat via dragon
After some discussion on Discord yesterday, Emily floated this idea to
have a check that fails if `Cargo.lock` has too many dependencies, where
"too many" means "more than a random number I made up and sounds good."

This implements that, as a non-required check, and to do so it invokes
the power of an extremely evil and annoying Dragon. We could also ask
this Dragon to do other things too I suppose (pending future contract
negotiations).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-04-04 21:19:23 +00:00
dependabot[bot]
a31c811265 github: bump taiki-e/install-action in the github-dependencies group
Bumps the github-dependencies group with 1 update: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.49.43 to 2.49.44
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](575f713d02...f1390fd0d8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 16:27:08 +00:00
Nicole Patricia Mazzuca
02687ac7e5 docs: standardize on .method() syntax
In docs/templates.md, the Commit type and Operation type looked like:

`method() -> ReturnType`

rather than everything else, which looks like:

`.method() -> ReturnType`

This commit changes the Commit and Operation types to look more like the
rest of the documentation.
2025-04-04 13:58:33 +00:00
Emily
370c624518 tests: add TestEnvironment::with_git_subprocess helper 2025-04-04 09:50:20 +00:00
Emily
350da7d013 cargo: bump gix to 0.71.0
Fix GHSA-794x-2rpg-rfgr.

`gix::Repository::work_dir` was renamed to `workdir` (though strangely
not the `gix::ThreadSafeRepository` version), and `lossy_config`
is now off by default in all configurations.
2025-04-04 04:28:42 +00:00
Emily
c488a4030f tests: fix subprocess toggle in git push --named tests 2025-04-04 03:02:01 +00:00
Yuya Nishihara
7146a99029 cargo: remove redundant default-features=false from testutils
There are no feature flags anymore.
2025-04-04 02:08:54 +00:00
Yuya Nishihara
a027f8f659 tests: port test_workspaces.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Yuya Nishihara
147b181368 tests: port test_working_copy.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Yuya Nishihara
37fd0f1256 tests: port test_util_command.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Yuya Nishihara
1e5d33beab tests: port test_undo.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Yuya Nishihara
0ada5bd868 tests: port test_templater.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Yuya Nishihara
8d8b760299 tests: port test_tag_command.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Yuya Nishihara
16c788aac5 tests: port test_status_command.rs to TestWorkDir API 2025-04-04 01:48:39 +00:00
Scott Taylor
12add9b35e merge_tools: fix :ours and :theirs merge tools
These merge tools didn't work properly on conflicted trees with more
than two sides since they didn't simplify the conflict before resolving.
The new implementation is more similar to how external merge tools are
executed, which should give a more consistent behavior.
2025-04-04 01:38:33 +00:00
Scott Taylor
a7b112ecb8 merge_tools: rename content to simplified_file_content
This makes it more clear that this is the only field in `MergeToolFile`
which is simplified.
2025-04-04 01:38:33 +00:00
Scott Taylor
466d237a06 merge_tools: demo issue with :ours and :theirs 2025-04-04 01:38:33 +00:00
Emily
71a619c19f tests: don’t use git2 in testutils 2025-04-03 19:03:44 +00:00
Emily
f14b3bf9a8 git: respect GIT_* environment variables in git2 tests
Previously, this was calling `git_repository_open()`,
which is equivalent to `git_repository_open_ext()` with
`flags = GIT_REPOSITORY_OPEN_NO_SEARCH` and `ceiling_dirs =
NULL`. This changes `ceiling_dirs` to an empty string, and adds
`GIT_REPOSITORY_OPEN_FROM_ENV` to `flags` when we’re in test code.

`GIT_REPOSITORY_OPEN_FROM_ENV` is used to respect the Git configuration
path environment variables, which is what we want for the test
hermeticity code. It works like this:

* `config_path_system` will use `$GIT_CONFIG_SYSTEM` because `use_env`
  will be set.
  
* `config_path_global` will use `$GIT_CONFIG_GLOBAL` because `use_env`
  will be set.
  
* `git_config__find_xdg` and `git_config__find_programdata` will find
  impure system paths and load them even when `$GIT_CONFIG_GLOBAL` is
  set, contrary to Git behaviour, so we need to set `$XDG_CONFIG_HOME`
  and `$PROGAMDATA`.

It has a few other effects, which I will exhaustively enumerate to
show that they are benign:

* It respects `$GIT_WORK_TREE` and `$GIT_COMMON_DIR`. These would
  already break our tests, I think, so we’re assuming they’re
  not set. (Possibly we should set them explicitly.)

* When opening a repository, it will:

  * Set the starting path for the search to `$GIT_DIR` if it’s
    `NULL`, but we do set it, so no change.

  * Initialize `ceiling_dirs` to `$GIT_CEILING_DIRECTORIES` if it’s
    `NULL`, but we do set it, so no change.

  * Respect `$GIT_DISCOVERY_ACROSS_FILESYSTEM` and set the
    `GIT_REPOSITORY_OPEN_CROSS_FS` flag appropriately. However,
    this is only checked on subsequent iterations of the loop in
    `find_repo_traverse`, and we set `GIT_REPOSITORY_OPEN_NO_SEARCH`
    which causes it to never enter a second iteration.

  * Use `ceiling_dirs` in `find_ceiling_dir_offset`, but the result is
    ignored when `GIT_REPOSITORY_OPEN_NO_SEARCH` is set, so changing
    from `NULL` to the empty string doesn’t affect behaviour. (It
    also would always return the same result for either value, anyway.)
2025-04-03 19:03:44 +00:00
Yuya Nishihara
0bcdedc159 tests: add missing insta::allow_duplicates! { .. }
Fixes #6230
2025-04-03 15:42:07 +00:00
Ilya Grigoriev
fa0b901c07 cli external merge tools: add tracing when reparsing conflicts
I was trying to debug `mergiraf` behavior, and having such diagnostic
would have been helpful.
2025-04-03 02:11:21 +00:00
Yuya Nishihara
ea6a768517 tests: port test_squash_command.rs to TestWorkDir API 2025-04-03 01:43:02 +00:00
Yuya Nishihara
87a35d5bb2 tests: port test_split_command.rs to TestWorkDir API 2025-04-03 01:43:02 +00:00
Yuya Nishihara
f2ca6b7740 tests: set up fake editor early in test_{split,squash}_command.rs
This helps avoid borrowing issue.
2025-04-03 01:43:02 +00:00
Yuya Nishihara
4faf07c872 tests: port test_sparse_command.rs to TestWorkDir API 2025-04-03 01:43:02 +00:00
Yuya Nishihara
87a78b6953 tests: port test_simplify_parents_command.rs to TestWorkDir API 2025-04-03 01:43:02 +00:00
Yuya Nishihara
3ce077de61 tests: inline create_repo() to callers in test_simplify_parents_command.rs
TestWorkDir will have to be borrowed from TestEnvironment, and the remaining
codes would be just "git init repo".
2025-04-03 01:43:02 +00:00
Yuya Nishihara
27824420aa tests: port test_sign_unsign_commands.rs to TestWorkDir API 2025-04-03 01:43:02 +00:00
Yuya Nishihara
b1bc934bad tests: port test_show_command.rs to TestWorkDir API 2025-04-03 01:43:02 +00:00
Waleed Khan
3a98c4e849 release: 0.28.0 v0.28.0 2025-04-02 23:52:10 +00:00
Waleed Khan
5a63fd9628 docs: update contributor command
- Now computes the latest tag automatically in the first suggested command.
- Now excludes dependabot.

I used the command to generate the list of contributors in the v0.28.0 release commit.
2025-04-02 23:52:10 +00:00
Scott Taylor
a902e63e65 merge_tools: add ":ours" and ":theirs" merge tools
We may want to implement these as options to `jj resolve` instead in the
future, but this is a simpler solution for now.
2025-04-02 22:09:15 +00:00
Scott Taylor
238a5587b0 merge_tools: split DiffTool and MergeTool enums 2025-04-02 22:09:15 +00:00
Kenyon Ralph
a1d2246cc2 FAQ: fix typo 2025-04-02 21:05:05 +00:00
dependabot[bot]
fb91f4ae6f github: bump rui314/setup-mold in the github-dependencies group
Bumps the github-dependencies group with 1 update: [rui314/setup-mold](https://github.com/rui314/setup-mold).


Updates `rui314/setup-mold` from f80524ca6eeaa76759b57fb78ddce5d87a20c720 to e16410e7f8d9e167b74ad5697a9089a35126eb50
- [Commits](f80524ca6e...e16410e7f8)

---
updated-dependencies:
- dependency-name: rui314/setup-mold
  dependency-type: direct:production
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-02 19:03:20 +00:00
Aleksey Kuznetsov
3c907cc019 cli: Add --sort option to the bookmark list command
This allows different sort orders for the bookmarks list, not only
alphabetically (by name).

Relates to #3831
2025-04-02 14:46:20 +00:00
Aleksey Kuznetsov
20dd35c1d5 commit: Make Commit::store_commit return &Arc<backend::Commit>
The underlying type is already under Arc
2025-04-02 14:46:20 +00:00
Nick Pupko
2ba756cc1d docs: replace outdated method in the Signature type
The `username()` is deprecated, but `email().local()` technically does the same now
2025-04-02 14:20:01 +00:00
Martin von Zweigbergk
9763143d65 fix: always rewrite descendants of fixed commits 2025-04-02 14:04:08 +00:00
Martin von Zweigbergk
70cd3ea67f fix: show bug when descendant is already fixed
If a commit needs fixing but its descendant does not, we currently
skip rewriting the descendant, which means it will instead be rebased
when the transactions finished. That usually results in
conflicts. This adds a test case for that case.
2025-04-02 14:04:08 +00:00
Siva Mahadevan
24cd079307 templates: create new git_format_patch_email_headers template
With this template, a 'git format-patch' compatible
email message can be generated using something like:

jj show --git --template git_format_patch_email_headers <rev>
2025-04-02 13:16:47 +00:00
dependabot[bot]
e67eba3abf cargo: bump the cargo-dependencies group across 1 directory with 2 updates
Bumps the cargo-dependencies group with 2 updates in the / directory: [clap](https://github.com/clap-rs/clap) and [rustix](https://github.com/bytecodealliance/rustix).


Updates `clap` from 4.5.34 to 4.5.35
- [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.34...clap_complete-v4.5.35)

Updates `rustix` from 1.0.3 to 1.0.5
- [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.3...v1.0.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.35
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: rustix
  dependency-version: 1.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 18:48:41 +00:00
dependabot[bot]
00eae152b1 github: bump taiki-e/install-action in the github-dependencies group
Bumps the github-dependencies group with 1 update: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.49.40 to 2.49.43
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](daa3c1f1f9...575f713d02)

---
updated-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-04-01 17:46:43 +00:00
Ilya Grigoriev
ecde53c5bb cli completion: add completion for jj git push --named
Follow-up to https://github.com/jj-vcs/jj/pull/5698
2025-04-01 16:56:33 +00:00