mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 13:26:16 +03:00
A time before time
This commit is contained in:
parent
aeea013ba0
commit
1389b9e465
@ -478,10 +478,7 @@ fn compute_resolutions(
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use std::{
|
use std::fs;
|
||||||
fs,
|
|
||||||
time::{SystemTime, UNIX_EPOCH},
|
|
||||||
};
|
|
||||||
|
|
||||||
use gitbutler_branch::BranchOwnershipClaims;
|
use gitbutler_branch::BranchOwnershipClaims;
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
@ -518,11 +515,6 @@ mod test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn make_branch(head: git2::Oid, tree: git2::Oid) -> Branch {
|
fn make_branch(head: git2::Oid, tree: git2::Oid) -> Branch {
|
||||||
let now = SystemTime::now()
|
|
||||||
.duration_since(UNIX_EPOCH)
|
|
||||||
.unwrap()
|
|
||||||
.as_millis();
|
|
||||||
|
|
||||||
Branch {
|
Branch {
|
||||||
id: Uuid::new_v4().into(),
|
id: Uuid::new_v4().into(),
|
||||||
name: "branchy branch".into(),
|
name: "branchy branch".into(),
|
||||||
@ -530,8 +522,8 @@ mod test {
|
|||||||
source_refname: None,
|
source_refname: None,
|
||||||
upstream: None,
|
upstream: None,
|
||||||
upstream_head: None,
|
upstream_head: None,
|
||||||
created_timestamp_ms: now,
|
created_timestamp_ms: 69420,
|
||||||
updated_timestamp_ms: now,
|
updated_timestamp_ms: 69420,
|
||||||
tree,
|
tree,
|
||||||
head,
|
head,
|
||||||
ownership: BranchOwnershipClaims::default(),
|
ownership: BranchOwnershipClaims::default(),
|
||||||
|
Loading…
Reference in New Issue
Block a user