-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathlib.rs
More file actions
62 lines (55 loc) · 1.81 KB
/
Copy pathlib.rs
File metadata and controls
62 lines (55 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright 2026 The Jujutsu Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! The core library powering the Jujutsu Version Control System. It contains
//! all "base" types such as `Commit` and the `Backend` trait.
#![warn(missing_docs)]
#![forbid(unsafe_code)]
#![deny(unused_must_use)]
// Needed so that proc macros can be used inside jj_core and by external crates
// that depend on it.
//
// See:
// - https://github.com/rust-lang/rust/issues/54647#issuecomment-432015102
// - https://github.com/rust-lang/rust/issues/54363
extern crate self as jj_core;
pub mod conflict_labels;
pub mod content_hash;
pub mod dag_walk;
pub mod dag_walk_async;
pub mod diff;
pub mod file_util;
pub mod graph;
pub mod hex_util;
pub mod matchers;
pub mod merge;
pub mod object_id;
pub mod ref_name;
pub mod repo_path;
pub mod str_util;
pub mod symbol_util;
#[cfg(test)]
#[cfg_attr(coverage_nightly, coverage(off))]
mod tests {
use tempfile::TempDir;
// Copied from `testutils::TestResult` to remove dependency cycle.
pub type TestResult<T = ()> = eyre::Result<T>;
/// Unlike `testutils::new_temp_dir()`, this function doesn't set up
/// hermetic Git environment.
pub fn new_temp_dir() -> TempDir {
tempfile::Builder::new()
.prefix("jj-test-")
.tempdir()
.unwrap()
}
}