From baa7c85ff3db2366d67ac875fca48ad6dcabf212 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 9 Jun 2025 23:03:30 +0200 Subject: git: Make fetch return the new head for the fetched branch --- server/common/src/tests.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/common/src/tests.rs') diff --git a/server/common/src/tests.rs b/server/common/src/tests.rs index 34cc315..c8553f7 100644 --- a/server/common/src/tests.rs +++ b/server/common/src/tests.rs @@ -272,15 +272,15 @@ async fn git_fetch(bare: bool) -> git::Repository { repo.fetch("branch"), repo.fetch("other"), ); - main.unwrap(); - branch.unwrap(); - other.unwrap(); + assert_eq!(main.unwrap(), "d7c502b9c6b833060576a0c4da0287933d603011"); + assert_eq!(branch.unwrap(), "2d05d489d42d4f36dd0ebf52502f243991e010eb"); + assert_eq!(other.unwrap(), "2cecdec660a30bf3964cee645d9cee03640ef8dc"); } else { // Not bare repo will complain when you try to fetch into the currently checked // out branch. So just try fetching other branches. let (branch, other) = tokio::join!(repo.fetch("branch"), repo.fetch("other")); - branch.unwrap(); - other.unwrap(); + assert_eq!(branch.unwrap(), "2d05d489d42d4f36dd0ebf52502f243991e010eb"); + assert_eq!(other.unwrap(), "2cecdec660a30bf3964cee645d9cee03640ef8dc"); } repo } -- cgit v1.2.3-70-g09d2