git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Bruhin <me@the-compiler.org>
To: git@vger.kernel.org
Subject: [BUG?] git-revert ignores --no-commit on conflicts
Date: Tue, 1 Apr 2014 15:24:54 +0200	[thread overview]
Message-ID: <20140401132454.GQ9499@lupin> (raw)

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

Hi,

I found something which seems to be a bug to me (or well, maybe I'm
doing something wrong...). When I revert a commit with -n/--no-commit
and there's a conflict, when doing "git revert --continue" I get an
editor, even though I wouldn't expect that to happen.

Example:

    $ git init
    Initialized empty Git repository in [...]
    $ echo foo > file
    $ git add file
    $ git commit -m "Initial commit"
    [master (root-commit) 9f8e5fb] Initial commit
     1 file changed, 1 insertion(+)
     create mode 100644 file
    $ echo bar > file
    $ git commit -am "foo -> bar"
    [master e53d99f] foo -> bar
     1 file changed, 1 insertion(+), 1 deletion(-)
    $ echo baz > file
    $ git commit -am "bar -> baz"
    [master fa3c23f] bar -> baz
     1 file changed, 1 insertion(+), 1 deletion(-)
    $ git revert -n HEAD  # this works as expected
    $ git revert --abort
    $ git revert -n e53d99f  # reverting the middle commit to provoke a conflict
    error: could not revert e53d99f... foo -> bar
    hint: after resolving the conflicts, mark the corrected paths
    hint: with 'git add <paths>' or 'git rm <paths>'
    $ echo fish > file
    $ git add file
    $ git revert --continue  # here my editor opens
    Aborting commit due to empty commit message.

Tested using git 1.9.1 and 1.9.0.msysgit.0.

Florian

-- 
() ascii ribbon campaign - stop html mail    www.asciiribbon.org
/\ www.the-compiler.org  | I love long mails http://email.is-not-s.ms/
Love is never asking why? 

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

                 reply	other threads:[~2014-04-01 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140401132454.GQ9499@lupin \
    --to=me@the-compiler.org \
    --cc=git@vger.kernel.org \
    /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).