mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 08:53:16 +00:00
testutils: add short method summary to its documentation
This commit is contained in:
parent
ac95a86584
commit
87840a5c2c
2 changed files with 10 additions and 5 deletions
|
@ -531,6 +531,8 @@ pub fn assert_rebased_onto(
|
|||
new_commit
|
||||
}
|
||||
|
||||
/// Maps children of an abandoned commit to a new rebase target.
|
||||
///
|
||||
/// If `expected_old_commit` was abandoned, the `rebased` map indicates the
|
||||
/// commit the children of `expected_old_commit` should be rebased to, which
|
||||
/// would have a different change id. This happens when the EmptyBehavior in
|
||||
|
|
|
@ -78,11 +78,14 @@ fn get_hash(content: &(impl jj_lib::content_hash::ContentHash + ?Sized)) -> Vec<
|
|||
jj_lib::content_hash::blake2b_hash(content).as_slice()[..HASH_LENGTH].to_vec()
|
||||
}
|
||||
|
||||
/// A commit backend for use in tests. It's meant to be strict, in order to
|
||||
/// catch bugs where we make the wrong assumptions. For example, unlike both
|
||||
/// `GitBackend` and `LocalBackend`, this backend doesn't share objects written
|
||||
/// to different paths (writing a file with contents X to path A will not make
|
||||
/// it possible to read that contents from path B given the same `FileId`).
|
||||
/// A commit backend for use in tests.
|
||||
///
|
||||
/// It's meant to be strict, in order to catch bugs where we make the
|
||||
/// wrong assumptions. For example, unlike both `GitBackend` and
|
||||
/// `LocalBackend`, this backend doesn't share objects written to
|
||||
/// different paths (writing a file with contents X to path A will not
|
||||
/// make it possible to read that contents from path B given the same
|
||||
/// `FileId`).
|
||||
pub struct TestBackend {
|
||||
root_commit_id: CommitId,
|
||||
root_change_id: ChangeId,
|
||||
|
|
Loading…
Reference in a new issue