8712 Commits

Author SHA1 Message Date
Yuya Nishihara
6f04f50a80 docs: add query example to fetch contributors from GitHub
I don't know if this is the correct way of using GitHub API, but it works.
2025-02-06 13:57:48 +00:00
Roman Timushev
6bd81c5800 docs: Add git merge to the git command equivalence table
People moving from git may want to know what is the jj equivalent of git merge.
2025-02-06 13:53:25 +00:00
Vincent Ging Ho Yim
2bde34394c github: fix build step names to use imperatives 2025-02-06 23:02:56 +11:00
Yuya Nishihara
6574f12173 local_working_copy: scan directory entries excluded by auto-track pattern
Since we need to scan directory entries recursively in order to detect new
untracked paths, it doesn't make sense to reuse the .gitignore code path.

This change means all untracked file paths are listed in "jj status" even if
the whole directory is untracked. It might be a bit verbose, but should be
okay. Directories like node_modules should be excluded by .gitignore, not by
auto-track pattern.

Fixes #5389
2025-02-06 18:04:57 +09:00
Jacob Hayes
4787dfef16
Fix backends.ssh.allowed-signers type in config-schema 2025-02-06 12:26:49 +07:00
Yuya Nishihara
613742dfbb release: 0.26.0
Reordered some changelog entries in a way that similar items are placed closer.
v0.26.0
2025-02-06 10:32:40 +09:00
Yuya Nishihara
1faea485ca git: enable sideband progress on subprocess push
The parsing function is adjusted in case stderr contained unparsed progress
messages.
2025-02-06 01:05:48 +00:00
Yuya Nishihara
5396138ed5 cli: update "only_path" warnings to say fileset expression instead of path
It's technically more correct.
2025-02-06 00:45:44 +00:00
Jonathan Gilchrist
9cd61ece4e docs: Split out commit guidelines into their own section
The commit guidelines feel like they're relevant before documentation
about the code review process - they could conceivably apply while
developing a change.

These often seem to get missed and raised during reviews - giving them
their own section may increase visibility.
2025-02-05 22:04:22 +00:00
Vincent Ging Ho Yim
8f15f7eae9 docs/install-and-setup: clarify wording re: binaries of latest GitHub release 2025-02-05 21:31:47 +00:00
Vincent Ging Ho Yim
0c12636981 docs/install-and-setup: move 'prerelease version' sentence to after 'Cargo Binstall' section
It seems that in 38daa9a the 'Cargo Binstall' section should have been inserted above the 'prelease version' sentence instead.
2025-02-05 21:31:21 +00:00
Vincent Ging Ho Yim
539cd75f90 docs: use styled admonition blocks for warnings
This is consistent with the rest of the docs.
2025-02-05 23:09:02 +11:00
Yuya Nishihara
e091172b63 git: force git subprocess to not localize error messages
Since we parse error messages, we need to disable translation at all.
2025-02-05 16:20:13 +09:00
Martin von Zweigbergk
f67373368e docs: describe how to do a release 2025-02-04 22:05:24 -08:00
Ilya Grigoriev
b95628c398 built-in pager: document key bindings
I mostly focused on:

- keys for absolute beginners
- keys for features for which it's not obvious they
  *have* a key binding
2025-02-05 02:38:11 +00:00
Ilya Grigoriev
f60014f3ee built-in pager: allow configuring streampager options
This also changes the default to be closer to `less -FRX`. Since this
default last changed very recently in #4203, I didn't mention this in
the Changelog.

As discussed in https://github.com/jj-vcs/jj/pull/4203#discussion_r1914372214

I initially kept the config closer to streampager's (see
https://github.com/jj-vcs/jj/compare/main...ilyagr:jj:streamopts?expand=1), but
then decided to make it more generic, smaller, and hopefully easier to
understand.
2025-02-05 02:38:11 +00:00
Ilya Grigoriev
8aa29169ea pager: refactor pager config (no-op)
In the future, we could consider adding a few more
special configs, e.g. `:pagerenv` that strictly uses
the `PAGER` environment variable, and `:unix` that
mimics Git's algorithm of trying `PAGER`, defaulting
to `less`, and setting `LESS`.
2025-02-05 02:38:11 +00:00
Yuya Nishihara
891fe085a6 templater: add DiffStats type to provide raw stats values
I originally considered adding `stats() -> DiffStats` which returns an
unprintable object, with deprecation of `.stat(width)` in favor of
`.stats().<method_to_render>(width)`. However, I couldn't find a good name for
the rendering function. This patch instead made the width parameter optional. I
think that's good because template language doesn't have to be overly strict.

Closes #4154
2025-02-05 00:31:16 +00:00
Yuya Nishihara
b9aef59f0d diff: extract DiffStats type and calculate() function
This will help write template based on diff.stat() result. #4154

show_diff_stats() isn't reimplemented as DiffStats method because I think
DiffStats can be moved to jj-lib.
2025-02-05 00:31:16 +00:00
Yuya Nishihara
7c2d9f2878 diff: map read error of materialized file to BackendError
io::Error in this context means write!(formatter, ..) failed, whereas this is an
error reading file content from the backend.
2025-02-05 00:31:16 +00:00
Yuya Nishihara
7a66122778 diff: rename struct DiffStat to DiffStatEntry
I'm going to add Vec<DiffStatEntry> wrapper as DiffStats.
2025-02-05 00:31:16 +00:00
Yuya Nishihara
e85644994a diff: accumulate diff stat numbers separately
Total aadded/removed counts will be provided as DiffStats methods. This change
might result in slightly bad perf, but that wouldn't matter in practice.
2025-02-05 00:31:16 +00:00
Yuya Nishihara
2bef93bbbe diff: do not format diff stat paths early
This helps extract pure computational part from show_diff_stat(). I'm going to
add DiffStats template type.
2025-02-05 00:31:16 +00:00
Josh Steadmon
227eccefdb templater: add pad_centered template function
Add a new pad_center function that centers content within a minimum
width. If an odd number of fill characters is required, the trailing
fill will be one character longer than the leading fill.

Fixes #5066.
2025-02-04 18:16:20 +00:00
dependabot[bot]
e6dfe1332c cargo: bump clap from 4.5.27 to 4.5.28 in the cargo-dependencies group
Bumps the cargo-dependencies group with 1 update: [clap](https://github.com/clap-rs/clap).


Updates `clap` from 4.5.27 to 4.5.28
- [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.27...clap_complete-v4.5.28)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-04 15:58:19 +00:00
Vincent Ging Ho Yim
e995f7eec2 docs/windows: remove unused link
The only usage of this link was removed in 2d0b715.
2025-02-04 12:59:26 +00:00
Vincent Ging Ho Yim
de3c90ac90 docs/install-and-setup: replace linuxbrew with Homebrew
The name `Linuxbrew` is no longer used since Homebrew 2.0.0:
https://brew.sh/2019/02/02/homebrew-2.0.0/
2025-02-04 12:42:21 +00:00
Vincent Ging Ho Yim
c3661d389c docs/windows: link to Git docs on core.autocrlf setting 2025-02-04 12:09:57 +00:00
Vincent Ging Ho Yim
6ff196a191 docs/windows: clarify that no CRLF-to-LF conversion is done by jj on committing
The original description suggests jj somehow converts line endings, when in fact all it
does is commit files as is (as described in the previous paragraph), whether the line
endings are CRLF or LF.
2025-02-04 12:09:57 +00:00
Yuya Nishihara
832e7b3522 cli: squash: use draft description template to generate editor content
Closes #5559
2025-02-04 06:05:58 +00:00
Yuya Nishihara
3cf6b3ca9d cli: split combine_messages() to two parts
Editor template will be rendered by caller.
2025-02-04 06:05:58 +00:00
Yuya Nishihara
e85a5c44cd rewrite: move description handling from squash_commits() to caller
This allows caller to reborrow tx.repo() to render description template. It
also matches the documented behavior.
2025-02-04 06:05:58 +00:00
Ilya Grigoriev
e5d126fba4 pyproject.toml: update to newer syntax
We've been using `uv 0.4` syntax, but we only support `uv` 0.5.1+. The
newer `uv 0.5` syntax follows an approved PEP, and the older syntax will
probably be removed at some point.

I also updated a few comments.
2025-02-04 04:58:26 +00:00
dependabot[bot]
0bcddff473 cargo: bump the cargo-dependencies group with 2 updates
Bumps the cargo-dependencies group with 2 updates: [async-trait](https://github.com/dtolnay/async-trait) and [syn](https://github.com/dtolnay/syn).


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

Updates `syn` from 2.0.96 to 2.0.98
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.96...2.0.98)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-04 00:30:14 +00:00
Martin von Zweigbergk
834b0f195b cli: bookmarks: don't show Git hint in non-Git repos
Noticed while importing the latest version into the Google repo (some
of our tests failed).
2025-02-03 23:46:05 +00:00
dependabot[bot]
bb87c2e831 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.47.32 to 2.48.1
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](65835784ac...510b3ecd79)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 21:02:45 +00:00
Vincent Ging Ho Yim
ebac2b8a4e docs: add language identifiers to code blocks to improve syntax highlighting 2025-02-03 13:43:24 +00:00
Vincent Ging Ho Yim
5fcd639ea4 docs: remove references to jj amend
`jj amend` is discouraged and no longer a visible alias of `jj squash` since 6d78d92. This
is the only remaining occurrence of it in the docs. We should recommend using `jj
squash` directly instead.
2025-02-03 13:00:51 +00:00
Yuya Nishihara
7898eb9f82 git: split function that queries remote default branch, call only when needed
With git.subprocess = true, it's more important to skip unneeded remote
operations. Each remote command may involve user intervention if authentication
requires manual step.

This change also means that the remote connection is no longer reused in git2
impl. I think the added cost is acceptable. The git2 impl will hopefully be
removed soon, and the remote branch name is needed only when cloning new repo.
2025-02-03 03:43:11 +00:00
Yuya Nishihara
241b8873ba revset: escape symbols in "did you mean" hint
The hint should include expressions that can be copied to -r argument.
2025-02-03 01:31:04 +00:00
Yuya Nishihara
fc7ac4c0bf revset: extract helper that formats remote symbol
I'll add a few more callers.
2025-02-03 01:31:04 +00:00
Yuya Nishihara
5be25bc8cf parser: use backtick to quote name or expression in error message
I don't have any preference about quoting styles, but it looks weird if an
escaped symbol is surrounded by double quotes.
2025-02-03 01:31:04 +00:00
Philip Metzger
f31abfd915 docs: Update the contributing docs to mention the new contributors team
I hope this makes the procedure clearer to new contributors like jakobhellerman.
2025-02-02 16:11:10 +00:00
Vincent Ging Ho Yim
193191cc35 rebase: fix grammar in doc comments 2025-02-02 13:44:25 +00:00
Martin von Zweigbergk
b3099b7b67 docs: add new logo as favicon 2025-02-01 22:43:55 +00:00
Jakob Hellermann
cfe5915c33 cli: complete: complete revset alias symbols for revisions 2025-02-01 17:16:01 +00:00
Jakob Hellermann
f7429f2254 cli: complete: add dynamic completions for -T template aliases 2025-02-01 16:58:46 +00:00
Angel Ezquerra
7c7486678e docs: update Sapling comparison logs 2025-02-01 16:50:53 +00:00
Yuya Nishihara
7e55dd2294 git: check remote existence without using git2::Repository 2025-02-01 11:04:38 +00:00
Yuya Nishihara
bba6f15dfe git: initialize subprocess context without using git2::Repository 2025-02-01 11:04:38 +00:00