add jjcommit script
$diff_output"
This commit is contained in:
parent
995ad5193c
commit
db8573c469
1 changed files with 13 additions and 0 deletions
13
bin/jjcommit.sh
Executable file
13
bin/jjcommit.sh
Executable file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue