We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb1310 commit 007fd8dCopy full SHA for 007fd8d
josh-sync/src/sync.rs
@@ -91,7 +91,10 @@ impl GitSync {
91
92
let current_sha = cmd!(sh, "git rev-parse HEAD").run().context("FAILED to get current commit")?;
93
if current_sha == sha {
94
- return Err(anyhow::anyhow!("No merge was performed, nothing to pull"));
+ cmd!(sh, "git reset --hard HEAD^")
95
+ .run()
96
+ .expect("FAILED to clean up after creating the preparation commit");
97
+ return Err(anyhow::anyhow!("No merge was performed, nothing to pull. Rolled back the preparation commit."));
98
}
99
100
// Check that the number of roots did not increase.
0 commit comments