dependabot[bot]
266b804326
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.26.10 to 3.26.11
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](e2b3eafc8d...6db8d6351f
)
---
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>
2024-10-04 11:45:53 -05:00
Samuel Tardieu
fb12e48fc9
cli: add short method summary to its documentation
2024-10-04 17:09:54 +02:00
Samuel Tardieu
8ba33b7383
lib: add short method summary to its documentation
2024-10-04 17:09:54 +02:00
Samuel Tardieu
87840a5c2c
testutils: add short method summary to its documentation
2024-10-04 17:09:54 +02:00
Samuel Tardieu
ac95a86584
proc-macros: add short method summary to its documentation
2024-10-04 17:09:54 +02:00
Samuel Tardieu
e2408078bf
cli: add pointer to the documentation in case of fileset syntax error
2024-10-04 17:09:43 +02:00
Yuya Nishihara
af556aa01c
tests: rename test_file_print_command.rs to_file_show_command.rs
2024-10-04 20:52:59 +09:00
Matt Stark
6878b5047b
Fix: Disallow revset function names starting with a number.
2024-10-04 15:25:11 +10:00
Theodore Ehrenborg
3d26af876f
docs: update stale references to singular file() revset
2024-10-03 22:39:42 +02:00
dependabot[bot]
f23d40ce5e
cargo: bump clap_complete in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [clap_complete](https://github.com/clap-rs/clap ).
Updates `clap_complete` from 4.5.30 to 4.5.32
- [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.30...clap_complete-v4.5.32 )
---
updated-dependencies:
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-10-03 18:07:25 +02:00
Samuel Tardieu
2f9561a4b8
CI: add a last name to the list of spelling exceptions
2024-10-03 00:21:56 +02:00
Samuel Tardieu
acdc42fd9f
doc: add comment to explain the syntax of folded examples
2024-10-02 19:37:18 +02:00
Martin von Zweigbergk
67c2ae0a9e
release: release version 0.22.0
2024-10-02 10:25:20 -07:00
dependabot[bot]
d1b2e7ea82
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap ), [clap_complete](https://github.com/clap-rs/clap ) and [indexmap](https://github.com/indexmap-rs/indexmap ).
Updates `clap` from 4.5.18 to 4.5.19
- [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.18...clap_complete-v4.5.19 )
Updates `clap_complete` from 4.5.29 to 4.5.30
- [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.29...clap_complete-v4.5.30 )
Updates `indexmap` from 2.5.0 to 2.6.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.5.0...2.6.0 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-10-02 16:17:46 +00:00
Lukas Wirth
72c5bbb4e6
Be more specific when warning the user about missing identity configs
...
Check if only the email or the name are missing in the config and specifically name the missing one, instead of always defaulting to potentially both missing.
2024-10-02 18:10:46 +02:00
Martin von Zweigbergk
f8e30fb1de
bookmarks: update docs to try to clarify mapping to Git branches
...
I also removed a few instances suggesting that we might map bookmarks
to something else in Git in the future (I don't think we have any such
plans).
2024-10-01 06:46:32 -07:00
Yuya Nishihara
4f8ae69367
diff: keep absolute ranges to support unchanged regions of different lengths
...
We have two options to achieve "diff --ignore-*-space":
a. preprocess contents to be diffed, then translate hunk ranges back
b. add hooks to customize eq and hash functions
I originally thought (a) would be easier, but actually, there aren't many
changes needed to implement (b). And (b) should have a fewer logic errors.
This patch removes assumption that each unchanged region has the same content
length. It won't be true if whitespace characters are ignored.
2024-10-01 21:24:02 +09:00
Yuya Nishihara
e28fdac48e
diff: extract helper that returns texts between two UnchangedRanges
2024-10-01 21:24:02 +09:00
Yuya Nishihara
055f15b6a8
diff: don't destructure UnchangedRange in a loop, rename base_range field
...
I'll replace offsets with absolute [Range, ..] to support unchanged regions of
different lengths. All fields in UnchangedRange will be ranges.
2024-10-01 21:24:02 +09:00
Yuya Nishihara
db226d9f64
revset: fix crash on "log --at-op 00000000 -r 'root()'"
...
Spotted while refactoring IdPrefixContext.
2024-10-01 21:23:47 +09:00
Yuya Nishihara
0a8d8dad67
cli: make default log revset work without working-copy commit
...
Spotted while adding an error propagation path from IdPrefixContext.
2024-10-01 20:04:06 +09:00
Yuya Nishihara
1f5835c267
cli: simplify help about default "log -r"
...
Since we've moved the default log revset to config/*.toml at 3dab92d2
, we don't
have to repeat the default value. It can be queried by "jj config list". I also
split the help paragraphs.
2024-10-01 20:04:06 +09:00
Yuya Nishihara
0ac6df7073
revset: make present(unknown@) recover from missing working copy error
...
Missing working-copy commit is similar situation to unknown ref, and should
be caught by present().
2024-10-01 20:04:06 +09:00
Yuya Nishihara
68176d965e
diff: do not translate word-range indices by collect_unchanged_ranges()
...
Intersection of unchanged ranges becomes a simple merge-join loop, so I've
removed the existing tests. I also added a fast path for the common 2-way
diffs in which we don't have to build vec![(pos, vec![pos])].
One source of confusion introduced by this change is that WordPosition means
both global and local indices. This is covered by the added tests, but I might
add separate local/global types later.
2024-10-01 06:31:22 +09:00
Yuya Nishihara
483db9d7d2
diff: reuse result vec when recurse into unchanged_ranges()
...
It's silly that we build new Vec for each recursion stack and merge elements
back. I don't see a measurable performance difference in the diff bench, but
this change will help simplify the next patch. If a result vec were created for
each unchanged_ranges() invocation, it would probably make more sense to return
a list of "local" word positions. Then, callers would have to translate the
returned positions to the caller's local positions.
2024-10-01 06:31:22 +09:00
Yuya Nishihara
f6277bbdb8
diff: remove redundant check for empty ranges from unchanged_ranges() recursion
...
It's cheap to create an empty Vec, and I'm going to remove it anyway.
2024-10-01 06:31:22 +09:00
dependabot[bot]
fd2c377a4a
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.26.9 to 3.26.10
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](461ef6c76d...e2b3eafc8d
)
---
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>
2024-09-30 18:49:51 +02:00
dependabot[bot]
0021744203
cargo: bump the cargo-dependencies group with 4 updates
...
Bumps the cargo-dependencies group with 4 updates: [once_cell](https://github.com/matklad/once_cell ), [regex](https://github.com/rust-lang/regex ), [syn](https://github.com/dtolnay/syn ) and [tempfile](https://github.com/Stebalien/tempfile ).
Updates `once_cell` from 1.19.0 to 1.20.1
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.1 )
Updates `regex` from 1.10.6 to 1.11.0
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0 )
Updates `syn` from 2.0.77 to 2.0.79
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.77...2.0.79 )
Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: syn
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-minor
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 18:49:39 +02:00
Ilya Grigoriev
d34198d111
docs: update mkdocs-material with bugfix, poetry update
...
This will hopefully make the version switcher stay
on the same page as it includes
https://github.com/squidfunk/mkdocs-material/pull/7559 .
Unfortunately, it might break again for reasons explained
there.
2024-09-29 13:56:08 -07:00
Tyler Goffinet
9f8d936189
cli: color author and commiter names yellow
...
When `format_short_signature(signature)` is set to `signature.name()` the author names are not yellow like other signature types (eg email and username). When the commit signatures have no colors, they blend in making it hard to distinguish between signatures and commit messages.
If just `name` were set to `yellow`, just like email and username, it affects the colorization of branch names making them also yellow despite them being designated as magenta. Setting `author` and `committer` to `yellow` is specific enough to allow branches to keep their colors while still coloring signature names. This is known to affect signatures in both 'log' and 'show'.
2024-09-28 23:34:26 -07:00
Yuya Nishihara
64e1ae277d
diff: remove redundant hash map lookup of uncommon shared words
2024-09-28 07:49:28 +09:00
Yuya Nishihara
5c52b4ec13
diff: omit construction of count-to-words map for right-side histogram
...
This also allows us to borrow Vec<WordPositions> from &self.
2024-09-28 07:49:28 +09:00
Yuya Nishihara
493f610fd5
diff: build left-right index map without using (word, occurrence) hash keys
...
We can assign a unique integer to each (word, occurrence) pair instead. As a
bonus, HashMap can be replaced with Vec.
```
group new old
----- --- ---
bench_diff_git_git_read_tree_c 1.00 72.5±3.25µs 1.08 78.5±0.48µs
bench_diff_lines/modified/10k 1.00 45.1±1.18ms 1.10 49.8±1.85ms
bench_diff_lines/modified/1k 1.00 4.1±0.07ms 1.11 4.5±0.34ms
bench_diff_lines/reversed/10k 1.00 19.0±0.12ms 1.12 21.2±1.26ms
bench_diff_lines/reversed/1k 1.00 558.5±37.42µs 1.17 655.6±16.27µs
bench_diff_lines/unchanged/10k 1.00 5.3±0.78ms 1.33 7.0±0.89ms
bench_diff_lines/unchanged/1k 1.00 422.0±16.68µs 1.28 540.7±13.96µs
```
2024-09-28 07:49:28 +09:00
Samuel Tardieu
f38c59f734
split: do not prevent all changes from going into the first commit
...
Let the user select all changes interactively and put them into
the first commit, and create a second commit with the possibility
of preserving the current commit message. This was previously only
possible in non-interactive mode by specifying matching paths, e.g.
".". In both cases, a warning will be issued indicating that the second
commit is empty.
2024-09-27 13:33:05 +02:00
Samuel Tardieu
98c16c4e19
split: do not reference file paths in warning
...
jj split warning was potentially wrong in both interactive and
non-interactive modes when everything is put into the child commit:
- Non-interactive mode: "The given paths does not match any file:
PATHS". The message is misleading, as the PATHS given on the command-line
may match files but not match files containing changes.
- Interactive mode: "The given paths does not match any file: " while
if possible that no paths were given on the command line.
2024-09-27 13:33:05 +02:00
Samuel Tardieu
0058c4f451
changelog: make indentation consistent
2024-09-26 20:22:17 +02:00
Samuel Tardieu
07c7d89f85
changelog: warning on jj git fetch
is a new feature, not a bugfix
2024-09-26 19:01:47 +02:00
dependabot[bot]
bd82ab3018
github: bump the github-dependencies group with 2 updates
...
Bumps the github-dependencies group with 2 updates: [actions/checkout](https://github.com/actions/checkout ) and [github/codeql-action](https://github.com/github/codeql-action ).
Updates `actions/checkout` from 4.1.7 to 4.2.0
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](692973e3d9...d632683dd7
)
Updates `github/codeql-action` from 3.26.8 to 3.26.9
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](294a9d9291...461ef6c76d
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-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>
2024-09-26 17:31:16 +02:00
Samuel Tardieu
baf25ba482
unsquash: deprecate in favor of squash and diffedit
...
Everything that could be done with `jj unsquash` can be done with
`jj squash` or `jj diffedit --preserve-descendants`.
2024-09-26 16:34:48 +02:00
dependabot[bot]
68832f4935
cargo: bump async-trait in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [async-trait](https://github.com/dtolnay/async-trait ).
Updates `async-trait` from 0.1.82 to 0.1.83
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.82...0.1.83 )
---
updated-dependencies:
- dependency-name: async-trait
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-09-25 11:45:05 -05:00
Essien Ita Essien
e99cca8a93
changelog: conflict()
and file()
deprecations are yet unreleased.
...
Move this update under `Unreleased`. I started the change before the last
release and after rebasing, forgot to move it. Fixing it now thanks to @yuja
catching this on time.
Issue: #4122
2024-09-25 09:57:53 +01:00
Yuya Nishihara
9551794f19
cli: print operation summary on "op restore" as we do for "undo"
2024-09-25 16:30:22 +09:00
Yuya Nishihara
b30ce36c55
cli: print operation summary before committing transaction
...
It seemed a bit odd that working-copy update was printed before the "undo"
operation we made earlier.
2024-09-25 16:30:22 +09:00
Yuya Nishihara
6cc76ba543
revset: fix copy-paste error in conflict() deprecation message
2024-09-25 16:26:49 +09:00
dependabot[bot]
d1ced44f24
cargo: bump libc from 0.2.158 to 0.2.159 in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [libc](https://github.com/rust-lang/libc ).
Updates `libc` from 0.2.158 to 0.2.159
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.159/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-09-25 07:40:39 +09:00
Yuya Nishihara
dd93e8f60b
diff: introduce newtype that represents word-range index
...
There are usize text indices/ranges and word-range indices. Let's make them
somewhat distinct.
2024-09-25 07:39:41 +09:00
Yuya Nishihara
739a5d8617
diff: pack (text, ranges) pair in a struct
...
I'll add a few more helper methods there. It might also make sense to cache
precomputed hash values.
unchanged_ranges() is made private since there are no external callers, and
I'm going to add more private types.
2024-09-25 07:39:41 +09:00
Yuya Nishihara
1b469321e2
diff: sort word occurrences only by positions
...
Since uncommon_shared_words are unique, their occurrence positions should also
be unique.
2024-09-25 07:39:41 +09:00
Yuya Nishihara
5842267c73
diff: use iter::zip() instead of slice indexing
2024-09-25 07:39:41 +09:00
Essien Ita Essien
2196eb1249
Update CHANGELOG to mention deprecation of file()
for files()
.
...
I missed this update in #4334 .
Issue: #4122
2024-09-24 20:29:28 +01:00