9016 Commits

Author SHA1 Message Date
Yuya Nishihara
1194b94e51 templater: inline old impl_core_wrap_property_fns!() macro
There aren't many users of this macro, and the set of Template-like types
wouldn't grow.
2025-05-10 10:04:30 +00:00
Yuya Nishihara
f5c36d5420 templater: replace remainders of P::wrap_<type>(), remove old wrap_<type> fns 2025-05-10 10:04:30 +00:00
Yuya Nishihara
098f7d3bee templater: annotate some property output types
As I'm going to remove P::wrap_<type>(), these types will no longer be inferred.
2025-05-10 10:04:30 +00:00
Yuya Nishihara
cd9a3fb45f templater: use WrapTemplateProperty trait in list helpers 2025-05-10 01:52:56 +00:00
Yuya Nishihara
f221a751fc templater: move wrap_list() to callers of build_filter_operation()
This will help annotate the output property type. build_map_operation() is also
updated for consistency.
2025-05-10 01:52:56 +00:00
Yuya Nishihara
a084561528 templater: use WrapTemplateProperty trait bound at parsing functions
All parsed template types can be deduced, but I've inserted type annotations
where the type is inferred only by template.format() call.
2025-05-10 01:52:56 +00:00
Yuya Nishihara
ae22633247 templater: introduce trait for wrapping BoxedTemplateProperty<O> types
Old P::wrap_<type>() functions will be removed, and the wrap_<type>() callbacks
will be replaced with L::Property: WrapTempalteProperty<C> trait bounds. We
could instead use the std From trait, but my feeling is that we would be better
off using less-generic abstraction. It's unlikely that external callers would
have to use this trait.

This will help define List<T> template methods as table of fn(..)s. I think the
parsing/building API will look slightly nicer.
2025-05-10 01:52:56 +00:00
Yuya Nishihara
5fc347cad9 templater: in tests, use custom context type instead of ()
I'm going to add generic wrap(BoxedTemplateProperty<T>) trait, which means a
conversion from T should be uniquely defined. Even though we won't add the ()
template type, it's better to not reserve () for tests.
2025-05-10 01:52:56 +00:00
Yuya Nishihara
b9e4e4fe8a rewrite: split move_commits() into immutable/mutable parts
This makes it clear that the repo state isn't mutated during computation of the
destination and descendants. Still compute_move_commits() is big, so we might
want to split it further. If needed, maybe we can add variants of
apply_move_commits() to fix up intermediate predecessor chains?

compute_move_commits() needs (immutable) &MutableRepo because it depends on
repo.find_descendants_for_rebase().
2025-05-10 01:52:48 +00:00
Yuya Nishihara
cb2944e287 rewrite: pack move_commits() parameters into struct for clarity 2025-05-10 01:52:48 +00:00
Yuya Nishihara
a9b153c2e7 rewrite: specify move target by Vec<CommitId> consistently 2025-05-10 01:52:48 +00:00
Yuya Nishihara
eb180dfda1 rewrite: unify sorted target Vec<Commit> and HashSet<CommitId> variables
MoveCommitsTarget will be changed to an enum of Vec<CommitId>.
2025-05-10 01:52:48 +00:00
Yuya Nishihara
7aa60cb12e rewrite: use &[CommitId] consistently as move_commits() destination arguments 2025-05-10 01:52:48 +00:00
Ilya Grigoriev
4711b78712 cleanup: fixup to 920debc, delete now-irrelevant comment
Fixup to 920debc that removed the line this comment was about.
2025-05-09 20:13:10 +00:00
Alper Cugun
0fe7b3a428 docs: Remove deprecated backout command from git table
Change default location for revert as suggested by @emilazy
2025-05-09 15:26:53 +00:00
Yuya Nishihara
885b83b5b9 working_copy: minimize use of #[cfg(windows)] around executable bit handling
It's tedious to update Windows code that isn't compiled locally.

In order to ensure conversion between bool and platform-native type, this patch
changes the type alias to real struct. I think this is also good if we decide to
retain executable bits on all platforms.
2025-05-09 10:19:38 +00:00
Winter
bece25ccc7 cli: diffedit: remove confusing/redundant documentation
The former wording of "With the `-r` option, which is the default" is
confusing, and made redundant by the clarifications within the
option-level documentation.
2025-05-09 05:00:02 +00:00
Winter
dddb4045fe cli: diff: document default arguments more precisely
The former wording of "[w]ith the `-r` option, which is the default..." is
a bit confusing. This change brings `jj diff`'s documentation more in
line with the other commands with similar semantics, such as `jj rebase`.
2025-05-09 05:00:02 +00:00
Yuya Nishihara
7fe4878d3e tests: update short commit id prefix after acd824269f1d 2025-05-09 02:47:53 +00:00
Winter
920debcc01 cleanup: remove fixed clippy bug workaround 2025-05-09 02:28:25 +00:00
Yuya Nishihara
79fb219159 files: make DiffLineIterator omit blank right line following matching+left
I was wondering whether this is presentation issue or not, and I think it is a
matter of DiffLineIterator. For matching hunks, DiffLineIterator flushes the
current_line buffer and bumps the line numbers for the next line. This should
guarantee that there are no blank DiffLine to be queued. However, for different
hunks, only the left line number can be bumped in the first loop, so there may
be an empty-looking hunk having the same right line number.

Closes #6471
2025-05-09 00:49:10 +00:00
Yuya Nishihara
39295238ac tests: demonstrate redundant right blank lines in color-words diffs 2025-05-09 00:49:10 +00:00
Martin von Zweigbergk
8ee0bd45c7 status: update severely stale command description
The command has displayed all parents and the diff summary from the
merged parents since 48c44344bfb3 (2022-12-04) but it still says that
it only cares about the first commit. This patch finally fixes that.
2025-05-09 00:48:55 +00:00
Martin von Zweigbergk
acd824269f git: write change-id header by default
We haven't had any reports of problems from people who opted in. Since
it's early in the release cycle now, let's now test it on everyone who
builds from head, so we get almost a month of testing from those
people before it's enabled by default in a released version.

This impacts lots of test cases because the change-id header is added
to the Git commit. Most are uninteresting. `test_git_fetch` now sees
some divergent changes where it used to see only divergent bookmarks,
which makes sense.
2025-05-08 23:05:38 +00:00
Martin von Zweigbergk
ed8dcc82b3 revset: make test a little easier to update if commit id changes
This should make it easier to find the right magic numbers to produce
commit ids with the same prefix.
2025-05-08 23:05:38 +00:00
Martin von Zweigbergk
2c39ba316b revset: use simpler constants for arbitrary numbers
AFAICT, it only matters that one of the numbers results in a commit ID
that starts with "040".
2025-05-08 23:05:38 +00:00
Martin von Zweigbergk
3683d43782 git_backend: use valid change id in tests
This will otherwise fail once we make the tests write the change id to
a commit header.
2025-05-08 23:05:38 +00:00
Winter
da6d564e26 nix: remove extraneous darwin build inputs
None of these are needed anymore thanks to the SDK rewrite. 🎉
2025-05-08 15:16:56 +00:00
Michael Pratt
88be1b4c56 docs: clarify commit_trailers deduplication
I spent quite a while confused by the presence of
`if(!trailers.contains_key("Change-Id")` in the `commit_trailers` example. My
thinking was: if `commit_trailers` already performs deduplication, then isn't
this logic useless?

Eventually I realized that the `commit_trailers` deduplication works on the
entire line, not just the key as I'd assumed. (And that makes sense for
trailers like Signed-off-by that can appear more than once.)

I've reworded the `commit_trailers` documentation to try to make this more
clear.
2025-05-08 09:17:56 +00:00
Gaëtan Lehmann
b31c4158cc split: add the --message option
to set the message on the first commit, where the selected
changes are going. The commit with the remaining changes
keeps the original description.
With this option it becomes possible to use split in a fully
non-interactive way, in combination with the filset feature.
It also makes jj split more consistent with other commands
like squash, commit or new.
2025-05-07 21:35:55 +00:00
Austin Seipp
72b342782a cli: suppress a warning when building without git
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-05-07 20:27:33 +00:00
Austin Seipp
df123d802a nix: nix flake update
Regularly scheduled update.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-05-07 20:27:33 +00:00
Austin Seipp
a08d184ba0 cargo: regular cargo update
Just pick up some transitive dep updates now that `libgit2` and all the
other stuff is gone.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-05-07 20:27:33 +00:00
Emily
8c7ca30074 git: inline subprocess_push_refs into push_updates 2025-05-07 19:29:20 +00:00
Emily
4f6e79a22a git: remove unused parameter from GitFetch::get_default_branch 2025-05-07 19:29:20 +00:00
Emily
34f36d41e2 git: inline GitFetchImpl into GitFetch 2025-05-07 19:29:20 +00:00
Emily
860a787958 git: remove GitFetchPrepareError 2025-05-07 19:29:20 +00:00
Emily
1f1440d334 tests: rename test_git_clone_with_depth{_subprocess =>} 2025-05-07 19:29:20 +00:00
Emily
adcc1de466 tests: remove obsolete insta::allow_duplicates! blocks 2025-05-07 19:29:20 +00:00
Emily
d2a8160a7a tests: remove obsolete git2 branches 2025-05-07 19:29:20 +00:00
Emily
2fec09ac60 tests: remove obsolete helpers 2025-05-07 19:29:20 +00:00
Emily
e942744f84 tests: deparameterize Git remote tests 2025-05-07 19:29:20 +00:00
Emily
7542fe94bc testutils: remove obsolete mention of libgit2 in comment 2025-05-07 19:29:20 +00:00
Emily
73739791be testutils: remove obsolete git2 hermeticity code 2025-05-07 19:29:20 +00:00
Emily
0ee9453ffa Revert "github: add variant without git2 to CI"
The `git2` feature has been removed.

This reverts commit 8104b65e74dd55876af9655b4032fbc488985f68.
2025-05-07 19:29:20 +00:00
Emily
7bcc5cca8f git: remove git2 feature 2025-05-07 19:29:20 +00:00
Emily
f3de3858ef git: remove git.subprocess setting 2025-05-07 19:29:20 +00:00
Austin Seipp
94269d2e72 release: 0.29.0
Signed-off-by: Austin Seipp <aseipp@pobox.com>
v0.29.0
2025-05-07 17:07:16 +00:00
Austin Seipp
5017c44deb docs: improve release process tidbits (again)
`heads(tags())` was rather confusing in my repository because I have
a bunch of tags pushed to my fork that are tracked locally. Assuming
that `trunk()` is something like `main@origin` or whatnot, then using
`heads(tags() & ::trunk())` works quite a bit better.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-05-07 17:07:16 +00:00
dependabot[bot]
489f693c47 github: bump the github-dependencies group with 4 updates
Bumps the github-dependencies group with 4 updates: [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain), [taiki-e/install-action](https://github.com/taiki-e/install-action), [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `dtolnay/rust-toolchain` from 56f84321dbccf38fb67ce29ab63e4754056677e0 to b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](56f84321db...b3b07ba8b4)

Updates `taiki-e/install-action` from 2.50.3 to 2.50.7
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](ab3728c7ba...86c23eed46)

Updates `astral-sh/setup-uv` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](c7f87aa956...6b9c6063ab)

Updates `github/codeql-action` from 3.28.16 to 3.28.17
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28deaeda66...60168efe1c)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
  dependency-type: direct:production
  dependency-group: github-dependencies
- dependency-name: taiki-e/install-action
  dependency-version: 2.50.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: astral-sh/setup-uv
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github/codeql-action
  dependency-version: 3.28.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 19:42:25 +00:00