Zuletzt aktiv 3 weeks ago

Little script to describe jj changes including the diff so it is easier to write message

travisshears's Avatar travisshears hat die Gist bearbeitet 10 months ago. Zu Änderung gehen

1 file changed, 13 insertions

jjcommit.sh(Datei erstellt)

@@ -0,0 +1,13 @@
1 + #!/bin/sh
2 +
3 + set -e
4 +
5 + # Run jj diff and prefix each line with "JJ: "
6 + diff_output="$(jj diff | sed 's/^/JJ: /')"
7 +
8 + # Add two newlines at the top (without the prefix)
9 + final_output="\n\n$diff_output"
10 +
11 + # Feed the string to jj desc --stdin
12 + # Use printf to preserve newlines
13 + printf "%b" "$final_output" | jj desc --stdin --edit
Neuer Älter