| Age | Commit message (Collapse) | Author |
|
Without this, my custom git commit template will get mangled
into the commit message with the call to fmt. I guess git strips
all of this stuff *after* it runs the commit-msg hook. Oy vey.
diff --git a/Omni/Ide/hooks/commit-msg b/Omni/Ide/hooks/commit-msg
index c15b4a1..bfbb06f 100755 --- a/Omni/Ide/hooks/commit-msg +++
b/Omni/Ide/hooks/commit-msg @@ -1,6 +1,7 @@
#!/usr/bin/env bash temp=$(mktemp)
-fmt -w 72 -u "$1" > "$temp" +# strip comment lines and everything
after >8 cut line +sed '/^#/d; /^# -\+ >8 -\+/,$d' "$1" | fmt -w 72
-u > "$temp"
mv "$temp" "$1" if ! gitlint --ignore-stdin --staged --msg-filename
"$1" run-hook; then
backup="$CODEROOT"/.git/COMMIT_EDITMSG.backup
|
|
The -s and -u flags tell fmt to fill the paragraph by merging
lines. Without this, fmt might just add line breaks, and this is
no good.
|
|
Sometimes aider will write commit messages without wrapping them at 80 chars,
and then the commit fails the gitlint hook, and aider can't finish the commit.
To fix this I can just auto-wrap before we check it.
|
|
I was getting confused about what is a product and what is internal
infrastructure; I think it is good to keep those things separate. So I moved a
bunch of stuff to an Omni namespace, actually most stuff went there. Only things
that are explicitly external products are still in the Biz namespace.
|