Skip to content

Commit

Permalink
Use local version of default branch when creating temporary branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctsrc committed Jan 26, 2024
1 parent b2ffa35 commit 47a7096
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Short names, big time savings. Repotools is a collection of comma
license = "ISC"
readme = "README.md"
repository = "https://github.com/ctsrc/repotools"
version = "0.10.0-rc2"
version = "0.10.0-rc3"
authors = ["Erik Nordstrøm <[email protected]>"]
categories = ["command-line-utilities", "development-tools", "science"]
keywords = ["git"]
Expand Down
6 changes: 3 additions & 3 deletions src/bin/sq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ fn main() {
let temp_branch = format!("temp-{ulid}");
eprintln!("Temporary branch: {temp_branch}");

// Squash op step 1: Create temporary branch
// Squash op step 1: Create temporary branch from local version of default branch
let status = Command::new("git")
.arg("checkout")
.arg("-b")
.arg(&temp_branch)
.arg(default_branch_w_remote_prefix)
.arg(default_branch)
.status()
.expect("Create temporary branch");
if !status.success() {
Expand All @@ -104,7 +104,7 @@ fn main() {
// TODO: If any subsequent command fails after this point,
// go back to branch we were on and then delete the temporary branch.

// Squash op step 2: Squash the branch
// Squash op step 2: Squash the original branch into the temp branch
let status = Command::new("git")
.arg("merge")
.arg("--squash")
Expand Down

0 comments on commit 47a7096

Please sign in to comment.