git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH 3/4] git-commit: Refactor creation of log message.
Date: Mon, 04 Feb 2008 20:07:45 -0800	[thread overview]
Message-ID: <7vzlugf3la.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vzluggp0q.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Mon, 04 Feb 2008 17:39:33 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> I suspect Dscho was worried about the case where he says "git
> commit", types message and then write-tree finds out that the
> index is still unmerged and the tree cannot be written out.
>
> And I'd be majorly annoyed if the "slight disadvange" was about
> that.
>
>>         discard_cache();
>>         read_cache_from(index_file);
>>         if (!active_cache_tree)
>>                 active_cache_tree = cache_tree();
>>         if (cache_tree_update(active_cache_tree,
>>                               active_cache, active_nr, 0, 0) < 0) {
>>                 rollback_index_files();
>>                 die("Error building trees");
>>         }
>
> I think this _could_ error out if your index is unmerged.

I just tried.  This would annoy me.

It is common to do something like this:

	$ git cherry-pick -n somethingelse
        $ git add this-and-that-path.c
        $ git commit

to get partial changes from somethingelse for paths you only
care about, and commit the result.  And you often get conflicts
to paths that do not matter (think of backporting trivial part
of fixes).  You need to reset the paths you do not care about
that conflicted, but you can forget that before running "git
commit".

With our "git commit", you first get "foo: unmerged" and you do
not see the editor.  With this change, you edit the message and
then see "foo: ummerged".

  reply	other threads:[~2008-02-05  4:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 14:27 [PATCH] git-commit: add a prepare-commit-msg hook Paolo Bonzini
2008-01-21 14:02 ` [PATCH 1/4] git-commit: support variable number of hook arguments Paolo Bonzini
2008-02-04 16:43   ` Johannes Schindelin
2008-02-05  3:09     ` Junio C Hamano
2008-01-21 14:06 ` [PATCH 2/4] git-commit: set GIT_EDITOR=: if editor will not be launched Paolo Bonzini
2008-01-21 14:27 ` [PATCH 4/4] git-commit: add a prepare-commit-msg hook Paolo Bonzini
2008-02-05  3:08   ` Junio C Hamano
2008-01-21 14:33 ` [PATCH 3/4] git-commit: Refactor creation of log message Paolo Bonzini
2008-02-04 16:48   ` Johannes Schindelin
2008-02-04 17:14     ` Paolo Bonzini
2008-02-05  1:39       ` Junio C Hamano
2008-02-05  4:07         ` Junio C Hamano [this message]
2008-02-05  6:07           ` Paolo Bonzini

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=7vzlugf3la.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bonzini@gnu.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).