Closed bimlas closed 7 years ago
I'll investigate it after middle of March but quick questions
Is :e reload cache correctly? Users may close buffer without commit and opens again a bit later with extra changes. In this case the message part should NOT be changed but comment part
Do you have any source that said COMMIT_EDITMSG exsist for this kind of feature? I'm not sure if gina should modify the file or keep
I've tested and the confirmed that this PR breaks a feature of caching.
:Gina commit --allow-empty
This is a test message
):w
:q
and hit n<CR>
:Gina commit
againSo without fixing this breaks, I'm not going to approve this PR.
I couldn't find a really better way to commit than the current solution.
What I tried:
COMMIT_EDITMSG
and store it in a variable (prev)git commit --no-template
and store it (bare)BuffWrite
write the contents back to COMMIT_EDITMSG
, thus the saved
commit message can be continued even after closing Vim and opening againThe diff is updated and the comments are recovered.
Problems:
COMMIT_EDITMSG
, thus the content of it is never gets cleaned - I don't want to delete the file, because it would affetc Git (or other scripts) behaviour=== COMMITTED ===
) on the last line, but this would be uglyI think the current solution is better than my so closing the PR, but I don't like that it plays with reflog: it can be destructive in certain situation.
It's absolutely unnecessary to do anything with the commit message cleanup, Git will prepare and clean by self.
Previously when there was no COMMIT_EDITMSG exist (case of a newly created/cloned repository), the error handling try/finally dropped an error about the missing file, it's fixed now.
I hope it really fixes #37