chore: merge 0.0.6 #6
3 changed files with 13 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "gg"
|
||||
version = "0.0.5"
|
||||
version = "0.0.6"
|
||||
edition = "2021"
|
||||
authors = ["Christina Sørensen <christina@cafkafk.com>"]
|
||||
repository = "https://github.com/cafkafk/gg"
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
- [ ] Generic repositories
|
||||
- [ ] Version pinning
|
||||
- [ ] libgit2 (maybe)
|
||||
* 0.1.0 [0%] [0/5]
|
||||
- [-] No functionality regressions
|
||||
* 0.1.0 [20%] [1/5]
|
||||
- [X] No functionality regressions
|
||||
- [X] commit works in quick, fast
|
||||
- [-] commit with edit works
|
||||
- [X] commit with edit works
|
||||
- [ ] Repo Flags Finished
|
||||
- [ ] Category Flags Finished
|
||||
- [ ] Optional Fields
|
||||
|
|
16
src/git.rs
16
src/git.rs
|
@ -189,20 +189,22 @@ impl GitRepo {
|
|||
}
|
||||
/// Tries to commit changes in the repository.
|
||||
///
|
||||
/// BUG does not work with output should use status() instead so it opens
|
||||
/// the editor
|
||||
/// # Development
|
||||
///
|
||||
/// - FIXME: this prints extra information to terminal this is because we
|
||||
/// use status() instead of output(), as that makes using the native editor
|
||||
/// easy
|
||||
#[allow(dead_code)]
|
||||
fn commit(&self) -> bool {
|
||||
if self.flags.contains(&RepoFlags::Push) {
|
||||
let output = Command::new("git")
|
||||
let status = Command::new("git")
|
||||
.current_dir(format!("{}{}", &self.path, &self.name))
|
||||
.arg("commit")
|
||||
.output()
|
||||
.status()
|
||||
.unwrap_or_else(|_| panic!("git repo failed to commit: {:?}", &self,));
|
||||
println!("{output:?}");
|
||||
output.status.success()
|
||||
status.success()
|
||||
} else {
|
||||
info!("{} has clone set to false, not cloned", &self.name);
|
||||
info!("{} has push set to false, not cloned", &self.name);
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue