Phases 0-1 + Sprint A: module split, CLI layer, org-refresh fix, hygiene
- LICENSE (MIT) + README truth-pass; docs/cli.md CLI contract - CLI subcommands (src/cli_cmds/) per "TUI for users, CLI for users+AI" - Hub/detail refactor: keymap dispatch, modal split, action enum, BgMsg bus - Fix: org repos were never refreshed (owner==username match); refresh now parallel — 49 repos in ~11s, surfaced 70 previously invisible PRs - Fix: 3 date bugs in detail/git.rs (format-local, Local::now, 1y month math) - Stash indicator + [m] actions, session persistence, gh CLI token fallback - Legacy UI modules removed; plan/ docs (roadmap, audit, debate, handoff)
This commit is contained in:
1 parent
5787b14880
commit
0468c032c6
100 files changed
+11614
-9840
No files matched your search
@@ -1,3 +1,12 @@
|
||||
//! Thin wrappers around invoking `git` as a subprocess against a given
|
||||
//! repo path. Used instead of a git library for commands where shelling out
|
||||
//! to the user's actual `git` binary (with their real config, credential
|
||||
//! helpers, hooks) is exactly the desired behavior.
|
||||
|
||||
/// Runs `git <args>` against `path`, inheriting stdio so output reaches the
|
||||
/// terminal directly. On failure, prints a short summary instead of
|
||||
/// propagating an error — most call sites treat a failed git command as
|
||||
/// "nothing changed" rather than something to abort the TUI over.
|
||||
pub fn git_run(path: &std::path::Path, args: &[&str]) {
|
||||
match std::process::Command::new("git").arg("-C").arg(path).args(args).status() {
|
||||
Ok(s) if s.success() => {}
|
||||
@@ -6,6 +15,9 @@ pub fn git_run(path: &std::path::Path, args: &[&str]) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Like `git_run`, but silent and returns success/failure instead of
|
||||
/// printing — used where the caller wants to branch on the result rather
|
||||
/// than just report it.
|
||||
pub fn git_run_ok(path: &std::path::Path, args: &[&str]) -> bool {
|
||||
std::process::Command::new("git").arg("-C").arg(path).args(args)
|
||||
.status().map(|s| s.success()).unwrap_or(false)
|
||||
|
||||
Reference in new issue
Block a user