Skip to content

Commit 66c513a

Browse files
committed
git-extra: fix notepad usage for commit messages
Uh oh. It seems that the patch that got merged into `master` somehow was not the patch that was tested, but instead a faulty one. The problem was that `git config <key>` returns an error if the key was not found and it made the code fail when no column wrapping was configured (and besides, the test for the column wrapping was inverted). To prove that *this* commit is good, it was made using git -c core.editor=notepad -c format.commitmessagecolumns=72 commit -s This fixes git-for-windows/git#517 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2dc0892 commit 66c513a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

git-extra/PKGBUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ source=('inputrc'
3535
md5sums=('3fab57079f0322efe256e95fe29d516f'
3636
'e7ad03fffc29e619e402dbd5ec9ef74c'
3737
'bfb591886b2a28af3334521e71198b74'
38-
'3aee284cbe68e59aa2c3e15a1b506274'
38+
'ed245a5fded4706d12a7c6d8455b966b'
3939
'e3b411a4f2e6553e41d0c4261160dd7d'
4040
'fb92ea53ef01b4f60ed04eabac81e2c7'
4141
'7180794bfa88c1f687c1a7940fc62293'

git-extra/notepad

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ notepad.exe "$1" &&
1616
dos2unix.exe "$1" &&
1717
case "$1" in
1818
*/COMMIT_EDITMSG|*\\COMMIT_EDITMSG)
19-
columns="$(git config format.commitmessagecolumns)" &&
20-
if test -z "$columns"
21-
then
19+
! columns="$(git config format.commitmessagecolumns)" || {
2220
msg="$(fmt.exe -s -w "$columns" "$1")" &&
2321
printf "%s" "$msg" >"$1"
24-
fi
22+
}
2523
;;
2624
esac

0 commit comments

Comments
 (0)