Commit graph

1461 commits

Author SHA1 Message Date
dependabot[bot]
c52e83e54d cargo: bump serde from 1.0.143 to 1.0.144
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.143 to 1.0.144.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.143...v1.0.144)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 23:01:04 -07:00
Martin von Zweigbergk
8b049cebd1 github: remove incorrect "v" prefix in a cargo-deny-action hash 2022-08-22 20:29:35 -07:00
Augie Fackler
e0208b9e8c workflows: pin action versions for cargo-deny checks 2022-08-22 22:33:37 -04:00
Augie Fackler
679cd4cd95 deny: run as a github action so it's tested in CI
I think I did this right?
2022-08-22 22:33:37 -04:00
Augie Fackler
6f21b321b0 deny: new config file for cargo-deny
This lets us quickly check for vulnerabilities and licenses we don't want.
2022-08-22 22:33:37 -04:00
Augie Fackler
298a972d4a chrono: update to latest version and disable oldtime feature
`oldtime` brings in an old version of the `time` crate, which we
don't need and has some issues reported in RustSec.
2022-08-22 22:33:37 -04:00
Augie Fackler
d7004085a0 pest: update to 2.3.x since 2.2.x has some yanked versions
Detected with cargo-deny.
2022-08-22 22:33:37 -04:00
dependabot[bot]
27c2a55091 cargo: bump insta from 1.18.2 to 1.19.0
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.2...1.19.0)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 16:26:20 -07:00
dependabot[bot]
ef987e9049 github: bump github/codeql-action from 2.1.18 to 2.1.19
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.18 to 2.1.19.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2ca79b6fa8...f5d217be74)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 09:02:58 -07:00
Martin von Zweigbergk
36354e4fa5 readme: add a pointer to the Discord server 2022-08-18 20:15:35 -07:00
Martin von Zweigbergk
7722223902 readme: clarify in the heading that this is a VCS 2022-08-18 20:15:35 -07:00
Yuya Nishihara
7eed4068e9 cli: do not discard working copy changes recovered from stale state
Otherwise the subsequent command would rerun the checkout, which would fail
if the diff contained added files.
2022-08-19 00:11:23 +09:00
Yuya Nishihara
51520bc87b working_copy: don't follow symlinks while creating parent directories
Otherwise a file could be created out of the working copy directory.

This only works for untracked symlinks and sequentially "added" symlinks
and files. For "removed" and "modified" entries, the parent directories are
considered valid and fs::remove_file() will be called. This also doesn't
prevent race conditions caused by concurrent checkouts.

New create_parent_dirs() would be slightly slower than the original because
it traverses directories from the root whereas fs::create_dir_all() does that
from the leaf and exits when reached to a directory.
2022-08-17 13:22:51 +09:00
Yuya Nishihara
fbcec1fd2c tests: don't leave /tmp/file, use tempfile::TempDir for cleanup 2022-08-17 12:15:04 +09:00
dependabot[bot]
6238f9b369 cargo: bump clap_complete from 3.2.3 to 3.2.4
Bumps [clap_complete](https://github.com/clap-rs/clap) from 3.2.3 to 3.2.4.
- [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-v3.2.3...clap_complete-v3.2.4)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 10:18:27 -07:00
dependabot[bot]
c54c8c0519 cargo: bump insta from 1.18.1 to 1.18.2
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.1...1.18.2)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 10:00:27 -07:00
dependabot[bot]
d7f008f52b cargo: bump clap from 3.2.16 to 3.2.17
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 09:59:41 -07:00
Martin von Zweigbergk
21f5bf8b15 cleanup: fix some things reported by clippy 1.63 2022-08-12 09:10:32 -07:00
dependabot[bot]
5f0cb71177 cargo: bump insta from 1.18.0 to 1.18.1
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.0...1.18.1)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 06:41:09 -07:00
dependabot[bot]
8b4f9483d8 cargo: bump serde from 1.0.140 to 1.0.143
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.140 to 1.0.143.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.140...v1.0.143)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-09 08:51:49 -07:00
dependabot[bot]
dca52545f3 cargo: bump pest_derive from 2.1.0 to 2.2.1
Bumps [pest_derive](https://github.com/pest-parser/pest) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](https://github.com/pest-parser/pest/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: pest_derive
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-09 08:51:27 -07:00
dependabot[bot]
db52028510 cargo: bump thiserror from 1.0.31 to 1.0.32
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.31 to 1.0.32.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.31...1.0.32)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 15:01:06 -07:00
dependabot[bot]
32c570b714 cargo: bump insta from 1.17.0 to 1.18.0
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/commits/1.18.0)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 14:22:41 -07:00
dependabot[bot]
5391b8bc28 cargo: bump serde_json from 1.0.82 to 1.0.83
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.82 to 1.0.83.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.82...v1.0.83)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 14:21:01 -07:00
dependabot[bot]
e19f2e74c9 cargo: bump config from 0.13.1 to 0.13.2
Bumps [config](https://github.com/mehcode/config-rs) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/mehcode/config-rs/releases)
- [Changelog](https://github.com/mehcode/config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mehcode/config-rs/compare/0.13.1...0.13.2)

---
updated-dependencies:
- dependency-name: config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 14:20:07 -07:00
dependabot[bot]
db4c1ba45e cargo: bump clap from 3.2.15 to 3.2.16
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.15 to 3.2.16.
- [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/v3.2.15...v3.2.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 14:19:51 -07:00
dependabot[bot]
8cc6e09a28 cargo: bump pest from 2.2.0 to 2.2.1
Bumps [pest](https://github.com/pest-parser/pest) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](https://github.com/pest-parser/pest/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: pest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 14:19:36 -07:00
dependabot[bot]
6ad4014c07 cargo: bump bytes from 1.2.0 to 1.2.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/commits)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 14:19:22 -07:00
Yuya Nishihara
cc860f771c working_copy: do not overwrite ignored file
Since the file should have been removed on Diff::Modified case, we can always
expect that write_file/conflict() creates new file.
2022-08-07 15:06:30 +02:00
Yuya Nishihara
b149cb07cc working_copy: make set_sparse_patterns() ignore existing working copy files
This doesn't work yet since write_file() overwrites the existing file, which
will be fixed by the next patch.

I've added a callback parameter to update() just because that's the easiest
option. If we want to report the number of the conflicting files (through
CheckoutStats), the callback interface wouldn't work nicely and the error
handling would have to be moved to the update() body. If we want to make
both check_out() and set_sparse_patterns() ignore EEXIST error, we can
eliminate the calback parameter at all.
2022-08-07 15:06:30 +02:00
Yuya Nishihara
f1df8215a2 working_copy: extract inner action of update() loop as closure
It serves as a try_block where I'm going to add EEXIST handling.
2022-08-07 15:06:30 +02:00
Yuya Nishihara
0ac8d370df tests: leverage fs::read() in test_gitignores_checkout_overwrites_ignored() 2022-08-07 15:06:30 +02:00
Yuya Nishihara
4f8583c7d2 cli: handle check out error of stale working copy gracefully
If "jj checkout" failed because of conflicting files, the subsequent command
would also fail. Let's make it at least not panic.
2022-08-07 15:06:30 +02:00
dependabot[bot]
7c90f9e18d github: bump github/codeql-action from 2.1.17 to 2.1.18
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.17 to 2.1.18.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0c670bbf04...2ca79b6fa8)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-05 18:43:38 +02:00
Martin von Zweigbergk
3e79eacaf7 cli: snapshot working copy even on e.g. jj diff -r <some hash>
I was initially worried about the cost of always snapshotting the
working copy, so that's why e.g. `jj diff -r <some hash>` doesn't do
it. However, there's been a few caused by missing snapshotting, and
there are still a few (I just noticed it in `jj undo` while writing
this patch). Let's always do the snapshotting and if the user really
doesn't want it, they can pass `--no-commit-working-copy` (which we
should probably rename to `--no-snapshot-working-copy` or maybe just
`--no-snapshot`). That should reduce bugs and make the CLI more
predictable.

Two test cases were affected becasue `jj merge` also didn't snapshot
the working copy.

Before this patch, e.g. `jj co --no-commit-working-copy` would error
out, but now it will succeed (without touching the working copy,
leaving the working copy stale). That may be confusing, but it should
be easy to recover from (e.g. by `jj undo`). We can consider adding a
check for it later if it seems too confusing (it's probably rarely
something the user wanted).
2022-07-29 22:06:53 +02:00
dependabot[bot]
514fd83663 github: bump github/codeql-action from 2.1.16 to 2.1.17
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.16 to 2.1.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3e7e3b32d0...0c670bbf04)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-29 21:10:07 +02:00
dependabot[bot]
e7fd575ee8 cargo: bump git2 from 0.14.4 to 0.15.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.14.4 to 0.15.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.14.4...git2-curl-0.15.0)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-29 21:09:25 +02:00
dependabot[bot]
19c01d9877 cargo: bump pest from 2.1.3 to 2.2.0
Bumps [pest](https://github.com/pest-parser/pest) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](https://github.com/pest-parser/pest/commits/v2.2.0)

---
updated-dependencies:
- dependency-name: pest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-29 21:08:55 +02:00
dependabot[bot]
e857152fa0 cargo: bump insta from 1.16.0 to 1.17.0
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/commits)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-29 14:35:12 +02:00
dependabot[bot]
753fd99846 cargo: bump clap from 3.2.14 to 3.2.15
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.14 to 3.2.15.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.15/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.14...v3.2.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-29 14:34:41 +02:00
dependabot[bot]
db971fa29f cargo: bump test-case from 2.1.0 to 2.2.1
Bumps [test-case](https://github.com/frondeus/test-case) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/frondeus/test-case/releases)
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frondeus/test-case/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: test-case
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-24 10:52:00 +02:00
dependabot[bot]
202f9038c7 cargo: bump insta from 1.15.0 to 1.16.0
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.15.0...1.16.0)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-24 10:51:38 +02:00
dependabot[bot]
96abce5a8e cargo: bump serde from 1.0.139 to 1.0.140
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.139 to 1.0.140.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.139...v1.0.140)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-24 10:51:13 +02:00
dependabot[bot]
c66b8307bd cargo: bump clap from 3.2.13 to 3.2.14
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.13 to 3.2.14.
- [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/v3.2.13...v3.2.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-24 10:50:55 +02:00
Martin von Zweigbergk
cb8f7b8184 store: inline Store::load() into caller
I think it makes sense for `RepoLoader` to know what kind of backend
to create. Then we can have some way of extending it for other backend
types.
2022-07-21 17:04:18 +02:00
Martin von Zweigbergk
25b922cd0b store: reduce duplication in Workspace and Repo init code
There is a bit of duplicated across the three functions for creating a
`Workspace` and `Repo`. This patch reduces that duplication by passing
in a closure.

In addition to reducing duplication, this is a step towards making it
easier to add new backends.
2022-07-21 17:04:18 +02:00
dependabot[bot]
07c8126053 cargo: bump clap from 3.2.12 to 3.2.13
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.12 to 3.2.13.
- [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/v3.2.12...v3.2.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 07:11:56 +02:00
dependabot[bot]
bf8a8caf01 cargo: bump bytes from 1.1.0 to 1.2.0
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 07:11:35 +02:00
iain barnett
980004e908 Added barebones config template with the odd alternative commented out. 2022-07-16 21:28:40 -07:00
iain barnett
573320ba7d Documented available config settings.
docs: Added config settings to documentation.
2022-07-16 21:28:40 -07:00