| 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 |
| 14 |
travisshears / jjcommit.sh
Last active 3 months ago
Little script to describe jj changes including the diff so it is easier to write message