From: Eugene Sajine <euguess@gmail.com>
To: Wincent Colaiuta <win@wincent.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
kusmabite@gmail.com,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Avery Pennarun <apenwarr@gmail.com>,
Jacob Helwig <jacob.helwig@gmail.com>,
git@vger.kernel.org
Subject: Re: [BUG] - "git commit --amend" commits, when exiting the editor with no changes written
Date: Wed, 3 Feb 2010 13:49:46 -0500 [thread overview]
Message-ID: <76c5b8581002031049t5558a700qe2e05bb70d175305@mail.gmail.com> (raw)
In-Reply-To: <1088CD70-9D6E-4B97-9A46-BDDE1535B703@wincent.com>
On Wed, Feb 3, 2010 at 1:21 PM, Wincent Colaiuta <win@wincent.com> wrote:
> El 03/02/2010, a las 16:45, Eugene Sajine escribió:
>
>> On Wed, Feb 3, 2010 at 2:31 AM, Matthieu Moy
>> <Matthieu.Moy@grenoble-inp.fr> wrote:
>>>
>>> Eugene Sajine <euguess@gmail.com> writes:
>>>
>>>> Thank you, but I'm not wrong, as i described the exact same thing
>>>> somewhere in my second or third message, without even knowing the
>>>> implementation details. I understand the reason WHY it is like it is,
>>>> i just don't like it as it is inconsistent and IMHO incorrect.
>>>
>>> Just try:
>>>
>>> Create a file.
>>> 1) Launch emacs, save and quit.
>>> 2) Launch emacs, don't save, and quit.
>>>
>>> From outside, it's EXACTLY the same thing. In the first case, emacs
>>> will just tell you "no change need to be saved" and quit, in the
>>> second, it'll quit. Try deleting the file in the meantime, it won't
>>> change the behavior.
>>>
>>> Now, what would you do about this? Ignore Emacs and force people to
>>> use vi?
>>>
>>> People have been spending a whole thread to explain you that it's not
>>> going to work. I think it'll either be time to acknowledge that, or to
>>> learn C and write a patch. Or perhaps try to write it in Java to
>>> understand why it doesn't work.
>>>
>>> --
>>> Matthieu Moy
>>> http://www-verimag.imag.fr/~moy/
>>>
>>
>> Tell me you're not serious, please;) I'm working with computers for
>> more than 20 years and I do understand how editors are opening files.
>> If you are serious though...:
>>
>> Please, do not assume i don't understand that file opened in editor
>> and saved with no changes will be the same as not saved.
>>
>> Please, do not assume i don't understand that current implementation
>> does not allow to correctly abort by simply quiting the editor,
>> because it uses the file content only to verify if it can proceed.
>>
>>
>> I will stop trying to explain the problem here, but the solution, that
>> i think should work:
>>
>> The solution should be as Avery proposed - to monitor file
>> modification timestamp as well as the content.
>> Timestamp should be remembered by git when editor is fired up and then
>> checked when you're exiting the editor. If it is the same - it means
>> that user canceled the whole operation by not confirming the file
>> content by save. If the timestamp is bigger than the saved one and the
>> message is not empty - we can proceed. Something like that.
>>
>> And finally:
>>
>> I DO highly appreciate everybody's time spent on every discussion and
>> particularly this one. I ask you to excuse me if i was failing to
>> properly express my thoughts or if i was too emotional at times.
>
> Perhaps you could invest a little time actually reading what people have
> written. Your proposal won't work because in the case where the user wants
> to keep the commit message without any modifications many editors won't
> touch the file even if people explicitly save it.
>
> Wincent
>
>
Thank you for clarifying that.
OK. I admit I got confused with the fact that some editors (vi,
kwrite, gedit - i just tested them to be 100% sure) do allow you to
hit save right after the file was opened and the timestamp will be
changed, while emacs or open office writer or some others do not, if
no changes has been made. Therefore there is no way to actually change
the timestamp on the file from editors like emacs without actually
changing something.
I'm very sorry for confusion, so, please, accept my apologies for
being stubborn.
I hope it is clear that my only intention is to try to make git better
and provide useful feedback and I'm sorry i didn't succeed this time.
Thanks,
Eugene
next prev parent reply other threads:[~2010-02-03 18:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 20:07 [BUG] - "git commit --amend" commits, when exiting the editor with no changes written Eugene Sajine
2010-02-02 20:14 ` Jacob Helwig
2010-02-02 20:27 ` Avery Pennarun
2010-02-02 20:47 ` Eugene Sajine
2010-02-02 20:58 ` Wincent Colaiuta
2010-02-02 21:56 ` Eugene Sajine
2010-02-02 22:03 ` Erik Faye-Lund
2010-02-02 22:06 ` Wincent Colaiuta
2010-02-02 22:31 ` Eugene Sajine
2010-02-02 22:35 ` Avery Pennarun
2010-02-02 23:02 ` Eugene Sajine
2010-02-02 23:15 ` Johannes Schindelin
2010-02-02 23:27 ` Eugene Sajine
2010-02-02 23:40 ` Avery Pennarun
2010-02-03 6:15 ` Larry D'Anna
2010-02-03 9:31 ` Jeff King
2010-02-03 10:15 ` Jeff King
2010-02-03 18:19 ` Avery Pennarun
2010-02-02 23:00 ` Johannes Schindelin
2010-02-02 23:34 ` Eugene Sajine
2010-02-02 23:40 ` Erik Faye-Lund
2010-02-02 23:48 ` Eugene Sajine
2010-02-03 0:16 ` Erik Faye-Lund
2010-02-03 0:55 ` Eugene Sajine
2010-02-03 1:59 ` SZEDER Gábor
2010-02-03 7:34 ` Matthieu Moy
2010-02-03 9:08 ` aborting rebase -i right at the start, was " Johannes Schindelin
2010-02-03 9:41 ` SZEDER Gábor
2010-02-03 16:02 ` Eugene Sajine
2010-02-03 7:31 ` Matthieu Moy
2010-02-03 15:45 ` Eugene Sajine
2010-02-03 17:51 ` Jonathan Nieder
2010-02-03 17:53 ` Jonathan Nieder
2010-02-03 18:21 ` Wincent Colaiuta
2010-02-03 18:49 ` Eugene Sajine [this message]
2010-02-03 18:57 ` Avery Pennarun
2010-02-03 19:27 ` Eugene Sajine
2010-02-03 19:54 ` Avery Pennarun
2010-02-03 18:47 ` Matthieu Moy
2010-02-02 23:58 ` Johannes Schindelin
2010-02-03 0:09 ` Eugene Sajine
2010-02-03 9:04 ` Johannes Schindelin
2010-02-03 9:46 ` Paolo Bonzini
2010-02-02 23:44 ` Junio C Hamano
2010-02-02 21:18 ` Avery Pennarun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76c5b8581002031049t5558a700qe2e05bb70d175305@mail.gmail.com \
--to=euguess@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=jacob.helwig@gmail.com \
--cc=kusmabite@gmail.com \
--cc=win@wincent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).