gitbit 0.1.0

A lightweight Git automation tool that generates commit messages from diffs using AI (Gemini).
1
2
3
4
5
6
7
8
9
10
use std::process::Command;

pub fn get_diff() -> String {
    let output = Command::new("git")
        .args(["diff", "--staged"])
        .output()
        .expect("Failed to run git diff");

    String::from_utf8_lossy(&output.stdout).to_string()
}