Re: git commit --verbose shows incorrect diff when pre-commit hook is used to modify files

2019-03-02 Thread Junio C Hamano
Fernando Chorney writes: > Hmm looks like I forgot to send my reply to this back to the mailing list. > > "Hmm, so I currently have it set to run vim as my commit editor, and > enter the message in there most of the time. I can definitely see > output from the hook into the shell before my vim ed

Re: git commit --verbose shows incorrect diff when pre-commit hook is used to modify files

2019-02-26 Thread Fernando Chorney
Hmm looks like I forgot to send my reply to this back to the mailing list. "Hmm, so I currently have it set to run vim as my commit editor, and enter the message in there most of the time. I can definitely see output from the hook into the shell before my vim editor loads up that shows me the diff

Fwd: git commit --verbose shows incorrect diff when pre-commit hook is used to modify files

2019-02-11 Thread Sergey Lukashev
Пересылаемое сообщение 12.02.2019, 01:54, "Sergey Lukashev" : Indeed. Sorry, this was how I thought it works. So the hook runs even if the commit is cancelled. A bit odd. Then let's have someone else from git list to answer your question. 12.02.2019, 01:11, "Fernando Chorne

Re: git commit --verbose shows incorrect diff when pre-commit hook is used to modify files

2019-02-11 Thread Sergey Lukashev
At the time you see the diff the committing of changes has not yet been initiated. It's only after you type in the message that the ACTUAL committing starts and the hook runs. You can print the diff of what your hook has changed by running "git diff" in it before adding changes. 12.02.2019, 00

git commit --verbose shows incorrect diff when pre-commit hook is used to modify files

2019-02-11 Thread Fernando Chorney
Hi, I am trying to use a pre-commit hook to modify files before they are to be committed. The problem I am running into is that if I use "git commit --verbose", which I often do so that I can see the diff, the diff it displays in the editor is the diff before the pre-commit hook was run rather tha