summaryrefslogtreecommitdiffstats
path: root/pkgs/claude-inbox.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-21 21:34:56 +0000
committertv <tv@krebsco.de>2026-11-21 21:34:56 +0000
commitbe76dde69c0ba3ac77721b66a41bde2df7f0a7a9 (patch)
treecd2b9692b77fce9025331d42cc6ea27e8733daf7 /pkgs/claude-inbox.nix
parent0a32aea2982cc660de84e582edd8ba902b880d8e (diff)
pkgs/claude-inbox: show --diff from HEAD, by default
What's checked out is what one compares with, most likely, rather than a local branch of the same name, which may well not be there.
Diffstat (limited to 'pkgs/claude-inbox.nix')
-rw-r--r--pkgs/claude-inbox.nix19
1 files changed, 6 insertions, 13 deletions
diff --git a/pkgs/claude-inbox.nix b/pkgs/claude-inbox.nix
index 2b8cf37..0e71ba2 100644
--- a/pkgs/claude-inbox.nix
+++ b/pkgs/claude-inbox.nix
@@ -31,9 +31,8 @@ let
to delete), yours (tv's own); * marks what changed since show or take.
--by-remote: grouped by OWNER.
show: master..BRANCH, with patches (and BRANCH is seen); --diff: the
- diff to BRANCH from WHAT (any branch or commit), by default from the
- local branch of BRANCH's name, without the remote's prefix (B, for
- REMOTE/B); without BRANCH, all branches, as a graph.
+ diff to BRANCH from WHAT (any branch or commit), by default from
+ HEAD; without BRANCH, all branches, as a graph.
take: fast-forward master (it has to be checked out) to BRANCH, and
push it to claude; --force: rename master to abandoned/master-DATE,
check out BRANCH as master (with the old one's upstream), and push it
@@ -203,17 +202,11 @@ let
test -z "$diff" || die "show --diff needs a BRANCH"
git -C "$r" log --oneline --all --graph
elif test -n "$diff"; then
- # from WHAT, any branch or commit, or by default, the local branch
- # of the same name, but for the remote's prefix
+ # from WHAT, any branch or commit, or by default, HEAD
b=''${args[0]}
- if test -n "$what"; then
- git -C "$r" rev-parse -q --verify "$what^{commit}" >/dev/null ||
- die "$name: no branch or commit $what"
- else
- what=''${b#*/}
- git -C "$r" rev-parse -q --verify "refs/heads/$what" >/dev/null ||
- die "$name: no local branch $what (for $b; or --diff=WHAT)"
- fi
+ what=''${what:-HEAD}
+ git -C "$r" rev-parse -q --verify "$what^{commit}" >/dev/null ||
+ die "$name: no branch or commit $what"
git -C "$r" diff "$what..claude/$b"
seen "$b"
else