Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ struct BootstrapArgs {
)]
debug: bool,

#[arg(long = "test_branch",
help = "Use the test branch of our Verus fork for testing",
default_value = "false",
action = ArgAction::SetTrue)]
test_branch: bool,
#[arg(
long = "branch",
help = "The branch name to pull (only used with --upgrade)",
value_name = "BRANCH_NAME"
)]
branch: Option<String>,
}

#[derive(Parser, Debug)]
Expand Down Expand Up @@ -424,11 +425,7 @@ fn bootstrap(args: &BootstrapArgs) -> Result<(), DynError> {
let options = verus::install::VerusInstallOpts {
release: !args.debug,
restart: args.restart,
branch: if args.test_branch {
Some("update-test".into())
} else {
None
},
branch: args.branch.clone(),
force_reset: args.upgrade,
};

Expand Down
7 changes: 6 additions & 1 deletion src/verus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,12 @@ pub mod install {

// Find the matching remote branch
let upstream_branch = format!("refs/remotes/origin/{}", target_branch);
let upstream_ref = repo.find_reference(&upstream_branch)?;
let upstream_ref = repo.find_reference(&upstream_branch).map_err(|_| {
format!(
"Branch '{}' does not exist in the remote repository. Please check the branch name.",
target_branch
)
})?;
let upstream_commit = upstream_ref.peel_to_commit()?;

// Check merge analysis
Expand Down