Skip to content

Commit

Permalink
feat: remove config commit on init existing repo
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Sep 29, 2020
1 parent d4aa61b commit 1028d0b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,10 @@ pub fn init<S: AsRef<Path> + ?Sized>(path: &S) -> Result<()> {
.add_all()
.map_err(|err| anyhow!("Could not add file to repository index : {}", err))?;

let message = if is_init_commit {
"chore: init commit".to_string()
} else {
"chore: add cocogitto config".to_string()
};
if is_init_commit {
repository.commit("chore: initial commit")?;
}

repository.commit(&message)?;
Ok(())
}

Expand Down

0 comments on commit 1028d0b

Please sign in to comment.