From db8573c4693e9a2fbccd13e8d75fcdb35ab0a6c4 Mon Sep 17 00:00:00 2001 From: Travis Shears Date: Mon, 8 Dec 2025 08:57:49 +0100 Subject: [PATCH] add jjcommit script $diff_output" --- bin/jjcommit.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/jjcommit.sh diff --git a/bin/jjcommit.sh b/bin/jjcommit.sh new file mode 100755 index 0000000..c673fec --- /dev/null +++ b/bin/jjcommit.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +# Run jj diff and prefix each line with "JJ: " +diff_output="$(jj diff --git | sed 's/^/JJ: /')" + +# Add two newlines at the top (without the prefix) +final_output="\n\n$diff_output" + +# Feed the string to jj desc --stdin +# Use printf to preserve newlines +printf "%b" "$final_output" | jj desc --stdin --edit