git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* why does "git revert" commit even if i try to bail with ":q!"?
@ 2019-03-12 17:22 Robert P. J. Day
  2019-03-12 17:53 ` Bryan Turner
  2019-03-12 18:14 ` Kevin Daudt
  0 siblings, 2 replies; 11+ messages in thread
From: Robert P. J. Day @ 2019-03-12 17:22 UTC (permalink / raw)
  To: Git Mailing list


  never noticed this before ... when i do a regular "git commit" and
enter my "vi" edit session and change my mind, i can bail with ":q!",
regardless of what i've set up as a commit message, and i'll see:

  Aborting commit due to empty commit message.

however, i was just playing with "git revert" and, after i ran:

  $ git revert <commit SHA>

i was dumped into another vi edit session:

Revert "HTTP->HTTPS"

This reverts commit 2965b41fd84a1a76f56984ecdf6c123d1992730f.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'rpjday/master'.
#
# Changes to be committed:
#       modified:   book/01-introduction/sections/installing.asc
#

  again, simulating that i changed my mind, i just typed ":q!", but
the revert went ahead, anyway. i tried again, this time completely
deleting all the lines from the commit msg (as the template
suggested), but the revert *still* completed after typing ":q!".

  it was only after deleting all the lines and using ":wq" that the
revert was cancelled:

  Aborting commit due to empty commit message.

that seems ... inconsistent. am i misunderstanding something?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-12 18:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 17:22 why does "git revert" commit even if i try to bail with ":q!"? Robert P. J. Day
2019-03-12 17:53 ` Bryan Turner
2019-03-12 18:01   ` Robert P. J. Day
2019-03-12 18:19     ` Bryan Turner
2019-03-12 18:22       ` Robert P. J. Day
2019-03-12 18:14   ` Robert P. J. Day
2019-03-12 18:20     ` SZEDER Gábor
2019-03-12 18:20     ` Bryan Turner
2019-03-12 18:14 ` Kevin Daudt
2019-03-12 18:20   ` Robert P. J. Day
2019-03-12 18:24     ` Elijah Newren

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).