-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notepad2 as editor gives logs and errors #517
Comments
After some digging it seems that:
is the problem. #!/bin/sh die () { echo "$*" >&2 exit 1 } test $# = 1 || die "Usage: $0 " if test -f "$1" then unix2dos.exe "$1" fi && notepad.exe "$1" && dos2unix.exe "$1" && case "$1" in */COMMIT_EDITMSG|*\\COMMIT_EDITMSG) columns="$(git config format.commitmessagecolumns)" && if test -z "$columns" then msg="$(fmt.exe -s -w "$columns" "$1")" && printf "%s" "$msg" >"$1" fi ;; esac This is new? Some kind of helper? |
@GerjanOnline Yes, it is a helper for using plain notepad. Since you are using Notepad2 instead, maybe setup your editor like this: |
git-for-windows/build-extra@69b301b makes sense. |
Can I turn this off somehow? I am used to being able to just type I can just delete the /usr/bin/notepad script for now, I guess, but it will presumably come back in an upgrade. Can we add an option to remove it entirely? |
@domenic Maybe you can create an alias to work around your issue: You could even use |
From this output, together with the original lines:
it appears that The really interesting part would be to investigate which command fails (is it These questions need to be answered instead of papering over the problem by deleting the |
@dscho Also, |
Yep, those are both bugs. |
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 <johannes.schindelin@gmx.de>
I am using:
Windows 10 x64
Git version 2.6.2.windows.1
Notepad2 x64 (this one overrides notepad)
.gitconfig
When I do
git config -e --global
:When i do
git commit --amend
(just to do a commit):Why do I get these messages? When I have
atom
as my editor it doesn't give me these messages...The text was updated successfully, but these errors were encountered: