最終更新 1759834438

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

修正履歴 695786111b538534a251d489e786cb6eedd78208

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