From f84b658530c0c0eaaaa0473add8c8c359fa6b09e Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 16 Feb 2026 22:39:51 +0000 Subject: feat: add --offline flag to list, checkout, apply commands Skip network fetch when --offline is set, using only local cache --- src/bin/ngit/cli.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index c77e719..85c74cd 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -117,11 +117,17 @@ pub enum Commands { json: bool, /// Show details for specific proposal (event-id or nevent) id: Option, + /// Use local cache only, skip network fetch + #[arg(long)] + offline: bool, }, /// checkout a proposal branch by event-id or nevent Checkout { /// Proposal event-id (hex) or nevent (bech32) id: String, + /// Use local cache only, skip network fetch + #[arg(long)] + offline: bool, }, /// apply proposal patches to current branch Apply { @@ -130,6 +136,9 @@ pub enum Commands { /// Output patches to stdout instead of applying #[arg(long)] stdout: bool, + /// Use local cache only, skip network fetch + #[arg(long)] + offline: bool, }, /// update repo git servers to reflect nostr state (add, update or delete /// remote refs) -- cgit v1.2.3