This commit is contained in:
parent
412b8d7691
commit
13922afe5e
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@ pub fn create_new_branch(branch: &str) {
|
|||
|
||||
/// Push the current repository to remote
|
||||
pub fn push(force: bool) {
|
||||
// TODO : Refuse push if WIP commit present
|
||||
if last_commit().as_str() == "WIP" {
|
||||
println!("{}", "Refusing to push WIP commit".paint(Color::Red));
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
let mut cmd = Exec::cmd("git")
|
||||
.arg("push")
|
||||
.arg("--set-upstream")
|
||||
|
|
Loading…
Add table
Reference in a new issue