Skip to content

Commit

Permalink
Merge pull request #2514 from matter-labs/deniallugo-tests
Browse files Browse the repository at this point in the history
feat(zk_toolbox): improve git pull function
  • Loading branch information
matias-gonz authored Jul 26, 2024
2 parents f822a94 + c01e4df commit 73a2ce4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zk_toolbox/crates/common/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub fn submodule_update(shell: &Shell, link_to_code: PathBuf) -> anyhow::Result<

pub fn pull(shell: &Shell, link_to_code: PathBuf) -> anyhow::Result<()> {
let _dir_guard = shell.push_dir(link_to_code);
Cmd::new(cmd!(shell, "git pull")).run()?;
let res = Cmd::new(cmd!(shell, "git rev-parse --abbrev-ref HEAD")).run_with_output()?;
let current_branch = String::from_utf8(res.stdout)?;
let current_branch = current_branch.trim_end();
Cmd::new(cmd!(shell, "git pull origin {current_branch}")).run()?;
Ok(())
}

0 comments on commit 73a2ce4

Please sign in to comment.