Yuya Nishihara
1d86e325c6
cli: move check_repo_rewritable() to WorkspaceCommandEnvironment
...
This ensures that the repo argument is used instead of self.repo(). store() is
now obtained from the repo argument (which shouldn't matter, though.)
2024-09-20 06:56:03 +09:00
dependabot[bot]
a04d092819
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.7 to 3.26.8
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](8214744c54...294a9d9291
)
---
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-19 13:12:42 -05:00
dependabot[bot]
b604be2320
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [pest](https://github.com/pest-parser/pest ) and [pest_derive](https://github.com/pest-parser/pest ).
Updates `pest` from 2.7.12 to 2.7.13
- [Release notes](https://github.com/pest-parser/pest/releases )
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.12...v2.7.13 )
Updates `pest_derive` from 2.7.12 to 2.7.13
- [Release notes](https://github.com/pest-parser/pest/releases )
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.12...v2.7.13 )
---
updated-dependencies:
- dependency-name: pest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: pest_derive
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-09-19 12:36:53 -05:00
Yuya Nishihara
0c9bc37f10
diff: buffer color-words context lines
...
I'm testing simple conflicts diffs locally, and we'll probably need to handle
consecutive context hunks when we add some form of unmaterialized conflicts
diffs. Let's buffer context hunks (up to 1 right now.) The new code looks
simpler.
2024-09-19 20:01:51 +09:00
Yuya Nishihara
9f5ce934d2
diff: extract function that prints color-words diff lines
...
This block is relatively big, and will become even bigger if we add support
for unmaterialized conflicts diffs.
2024-09-19 20:01:51 +09:00
Yuya Nishihara
79e76c5dad
diff: extract line number handling from show_color_words_diff_line()
...
This seems more consistent with !can_inline case, and we can remove extra
vec![] allocation from context line processing.
2024-09-19 20:01:51 +09:00
dependabot[bot]
47323c883a
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.26 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.26...clap_complete-v4.5.28 )
---
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-09-18 11:23:21 -05:00
Samuel Tardieu
726cbbd66c
diffedit: separate extra help information in its own paragraph
2024-09-18 09:11:07 +02:00
Vamsi Avula
a2e67bdd9b
templates: add .normal_hex() for {Commit,Change}Id
...
This doesn't do much for CommitId but outputs the "forward" hex for
ChangeId, which can be useful to use as Gerrit Change-Id.
2024-09-17 21:11:00 -05:00
Samuel Tardieu
05c6d62c68
bookmark: add "b" alias
...
`jj bookmark` is a frequently used command. Its subcommands already have
one letter aliases. Defining `jj b` as an alias for `jj bookmarks` make
bookmarks really easy to use.
2024-09-17 18:24:26 +02:00
Essien Ita Essien
e25ec536ed
next/prev: Fetch descendants with more correctness.
...
See context in [this discussion](https://github.com/martinvonz/jj/pull/3935#discussion_r1649520967 )
Fixes #3947
2024-09-17 16:39:29 +01:00
Samuel Tardieu
6d0a092410
cli: remove unused dependency on hex
2024-09-17 12:34:31 +02:00
Samuel Tardieu
c1a032fad6
squash doc: --keep-emptied let the description unchanged
2024-09-17 11:49:48 +02:00
mlcui
4308e1a21e
Downgrade once_cell to 1.19.0
...
1.20.0 was yanked: https://github.com/matklad/once_cell/issues/264
2024-09-17 14:37:07 +10:00
Kevin Liao
412ef36259
cli: Support renaming workspaces
...
fixes #4342
2024-09-16 19:35:36 -07:00
Ilya Grigoriev
5bd7588738
contributing.md: make MkDocs happier with a link
2024-09-16 16:44:31 -07:00
Ilya Grigoriev
1c397b5d1b
docs website & mkdocs.yml: redirect /branches/
URL
...
After this is merged, https://martinvonz.github.io/jj/prerelease/branches/
should redirect to https://martinvonz.github.io/jj/prerelease/bookmarks/
instead of resulting in a 404 error and old links to docs
(from posts or from Google index) breaking.
2024-09-16 16:44:31 -07:00
Yuya Nishihara
a684076f16
hex_util: simplify common_hex_len() a bit to compare input bytes once
...
I think it's slightly easier to follow if we calculate a diff of input bits
first. I don't know which one is faster, but I assume compiler can optimize to
similar instructions.
2024-09-17 07:02:01 +09:00
dependabot[bot]
ac605d2e7b
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [anyhow](https://github.com/dtolnay/anyhow ), [once_cell](https://github.com/matklad/once_cell ) and [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions ).
Updates `anyhow` from 1.0.88 to 1.0.89
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.88...1.0.89 )
Updates `once_cell` from 1.19.0 to 1.20.0
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.0 )
Updates `pretty_assertions` from 1.4.0 to 1.4.1
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases )
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.4.0...v1.4.1 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 11:35:49 -05:00
Samuel Tardieu
56dbbb8fc6
lib: optimize common prefix computation of two hex strings
...
Comparing each byte before comparing the nibbles is more efficient. A
benchmark comparing the old and new implementations with various common
prefix lengths shows:
```
Common hex len/old/3 time: [7.5444 ns 7.5807 ns 7.6140 ns]
Common hex len/new/3 time: [1.2100 ns 1.2144 ns 1.2192 ns]
Common hex len/old/6 time: [11.849 ns 11.879 ns 11.910 ns]
Common hex len/new/6 time: [1.9950 ns 2.0046 ns 2.0156 ns]
Common hex len/old/32 time: [63.030 ns 63.345 ns 63.718 ns]
Common hex len/new/32 time: [6.4647 ns 6.4800 ns 6.4999 ns]
```
2024-09-15 18:32:28 +02:00
Samuel Tardieu
a7f32d3652
squash: accept -k as a shorthand for --keep-emptied
...
This eases the workflow in which a commit in the middle of the tree is
repeatedly squashed into its parent.
2024-09-15 18:31:47 +02:00
Lukas Wirth
7ff12ec8b0
op-diff: Use op_summary template
2024-09-15 14:11:33 +02:00
Lukas Wirth
8e727de2ab
undo: Report what operation has been undone in jj op undo
2024-09-15 14:11:33 +02:00
Yuya Nishihara
cb07e5ab67
cli: borrow RepoLoader from Workspace
...
It should be slightly cheaper than constructing new RepoLoader.
2024-09-15 20:40:46 +09:00
Yuya Nishihara
9dc2cf802c
cli: add helper to set up op template environment for the current repo state
...
We'll add a few more callers.
2024-09-15 20:40:46 +09:00
Yuya Nishihara
0c0e1b61e3
git-push: just say "Changes to push to <REMOTE>"
...
"Bookmark changes" sounds like changes will be bookmarked, and "Bookmark" here
is redundant. If we add support for pushing tags, this message will have to be
generalized anyway.
2024-09-15 07:06:56 +09:00
Yuya Nishihara
a48ecf3e62
git-push: remove redundant hash map lookup from print-changes loop
2024-09-15 07:06:56 +09:00
Yuya Nishihara
2f78c25d35
git-push: skip print-changes loop if --quiet
2024-09-15 07:06:56 +09:00
Yuya Nishihara
42f7908b8d
git-push: extract function that prints bookmark changes to be pushed
2024-09-15 07:06:56 +09:00
Yuya Nishihara
c6ee6130da
revset: use generic GraphEdge type in default graph iterator
2024-09-15 07:06:47 +09:00
Samuel Tardieu
6e72b1cfb0
git: add --remote option to clone command
...
This makes it easier to work with multiple remotes at once while
tracking the default branch of the remote used to create the local
repository:
```shell
$ jj git clone --remote upstream https://github.com/upstream-org/repo
$ cd repo
$ jj git remote add origin git@github.com:your-org/repo
$ jj config set --repo git.fetch upstream
```
In the example above, `upstream` is the repository containing the
reference source code that you might want to patch, while `origin` is
your fork where pull-request will be pushed. The branch `main@upstream`
will be tracked.
2024-09-13 18:14:57 +02:00
dependabot[bot]
fc341855e5
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [anyhow](https://github.com/dtolnay/anyhow ), [ignore](https://github.com/BurntSushi/ripgrep ) and [rustix](https://github.com/bytecodealliance/rustix ).
Updates `anyhow` from 1.0.86 to 1.0.88
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.86...1.0.88 )
Updates `ignore` from 0.4.22 to 0.4.23
- [Release notes](https://github.com/BurntSushi/ripgrep/releases )
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md )
- [Commits](https://github.com/BurntSushi/ripgrep/commits )
Updates `rustix` from 0.38.36 to 0.38.37
- [Release notes](https://github.com/bytecodealliance/rustix/releases )
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md )
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.36...v0.38.37 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: ignore
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>
2024-09-13 16:02:24 +00:00
dependabot[bot]
5cd0bdea1b
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.6 to 3.26.7
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](4dd16135b6...8214744c54
)
---
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-13 10:53:37 -05:00
Yuya Nishihara
41ef9a76de
cli: actually test if format_short_change_id() can be parsed
...
It's usually included in the commit_summary template, but not guaranteed.
2024-09-13 21:59:35 +09:00
Lukas Wirth
62059dd91e
Fix missing word in working-copy.md
2024-09-13 13:36:52 +02:00
Lukas Wirth
1410f2bee7
docs: Remove trailing whitespace in markdown files
2024-09-13 13:06:28 +02:00
Lukas Wirth
bccd8214df
conflicts: Highlight change ids in rebase advice
2024-09-13 12:57:56 +02:00
Yuya Nishihara
bea013acd6
id_prefix: fix crash on hidden change id disambiguation
...
The short-prefixes revset may contain remote_branches() for example.
Fixes #4446
2024-09-13 19:32:53 +09:00
Martin von Zweigbergk
63e616c801
git: restore support for git.push-branch-prefix
config but deprecate it
2024-09-12 23:28:30 -07:00
Martin von Zweigbergk
136dcac1e1
changelog: remove an unclear "in lieu of"
...
I wasn't sure how to read the sentence. I think "as part of" is
clearer.
2024-09-12 23:00:57 -07:00
Martin von Zweigbergk
c2220ca4d5
config-schema: update stale push-branch-prefix
config
...
We missed this when we renamed `push-branch-prefix` to
`push-bookmark-prefix`. I changed the description slightly to try to
clarify that it's about the local bookmark that's created before
pushing it to the remote as a branch.
2024-09-12 23:00:20 -07:00
Ilya Grigoriev
74e3c4efe2
FAQ: Add another problem to be aware of when co-locating a repo
2024-09-12 21:46:36 -07:00
Emily Shaffer
5aa6fa5974
docs: introduce temporary governance voting process
...
In order for the governance working group to make progress establishing
jj's governance structure, we need the approval of the jj community.
Set up a temporary voting process to get that approval.
Additionally, set up a governance dir for other governance-related
documentation to sit in.
Later, when we have a permanent governance structure and enough policy
to let the community make changes without needing the governance working
group, we can delete this document.
2024-09-12 15:19:46 -07:00
Philip Metzger
5f84c73b5a
RFC: Formalize our commit style to mention that we don't use conventional commits.
...
It's the simple _when in Rome, do as the Romans do_ rule.
2024-09-12 16:52:02 +02:00
Martin von Zweigbergk
8d4445d5d1
bookmarks: rename proto symbols from "branch"
...
Proto fields are identified by the tag (and the message names are not
used), so it's safe to rename them.
2024-09-11 20:49:50 -07:00
Martin von Zweigbergk
1aa2aec141
bookmarks: update some leftover uses of the word "branch"
2024-09-11 19:19:31 -07:00
Yuya Nishihara
d97a7ba86f
cli: fix missed working-copy "bookmark" colors
...
Quoting style changed because of insta v1.40.0.
2024-09-12 09:02:16 +09:00
Yuya Nishihara
78edc6aba5
op log: add --op-diff option to embed operation diffs
...
This is basically "log -p" for "op log". The flag name has "op" because --diff
and --patch mean a similar thing in this context. Since -p implies --op-diff,
user can just do "op log -p" if he's okay with verbose op + content diffs.
Note that --no-graph affects both "op log" and "op diff" parts.
We might want to do some style changes later, such as inserting/deleting blank
lines, highlighting headers, etc.
2024-09-12 06:51:45 +09:00
Yuya Nishihara
050cde94ef
op diff: apply word wrapping to non-graph template outputs
...
These contents may be embedded in "op log", and it's probably good to enable
word wrapping consistently.
2024-09-12 06:51:45 +09:00
Yuya Nishihara
babdf6b9c1
cli: relax error type of LogContentFormat::write()
2024-09-12 06:51:45 +09:00