diff options
Diffstat (limited to 'test_utils/src/git.rs')
| -rw-r--r-- | test_utils/src/git.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test_utils/src/git.rs b/test_utils/src/git.rs index 5ae7f39..2a3d566 100644 --- a/test_utils/src/git.rs +++ b/test_utils/src/git.rs | |||
| @@ -274,12 +274,11 @@ impl GitTestRepo { | |||
| 274 | Ok(()) | 274 | Ok(()) |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | pub fn checkout_remote_branch(&self, branch_name: &str) -> Result<()> { | 277 | pub fn checkout_remote_branch(&self, branch_name: &str) -> Result<Oid> { |
| 278 | self.checkout(&format!("remotes/origin/{branch_name}"))?; | 278 | self.checkout(&format!("remotes/origin/{branch_name}"))?; |
| 279 | let mut branch = self.create_branch(branch_name)?; | 279 | let mut branch = self.create_branch(branch_name)?; |
| 280 | branch.set_upstream(Some(&format!("origin/{branch_name}")))?; | 280 | branch.set_upstream(Some(&format!("origin/{branch_name}")))?; |
| 281 | self.checkout(branch_name)?; | 281 | self.checkout(branch_name) |
| 282 | Ok(()) | ||
| 283 | } | 282 | } |
| 284 | } | 283 | } |
| 285 | 284 | ||