git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: kusmabite@gmail.com, Git Mailing List <git@vger.kernel.org>
Subject: Re: git-rebase -i prunes commits with empty commit-message
Date: Wed, 10 Mar 2010 11:53:22 -0800	[thread overview]
Message-ID: <7veijsrm19.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4B979AEF.5010201@alum.mit.edu> (Michael Haggerty's message of "Wed\, 10 Mar 2010 14\:13\:19 +0100")

Michael Haggerty <mhagger@alum.mit.edu> writes:

> Does git really claim to handle commits with empty commit messages?

Yes, I would say it is a bug in rebase-i if it refuses to deal with
histories with such commits.  Warning and giving the user a chance to
add message _might_ be good, but allowing no way out would be
inexcusable.  Even adding a fake "(original commit had no message)"
as the message and continuing would be better than stopping or
dropping commits.

The Porcelain "git commit" by default complains if you do not give any
message, because it usually is an end-user mistake to directly use
"git commit" and not writing anything about the resulting commit.
However,

 (1) The plumbing allows it because such a policy to forbid commits
     without comments does not belong there, e.g. this would succeed:

     $ git commit-tree HEAD^{tree} </dev/null

 (2) Even the Porcelain allows it if you ask nicely:

     $ git commit --cleanup=verbatim -m ''

These are primarily so that you can deal with histories created by
other people's tools (e.g. foreign SCM, third party Porcelains, etc.).
You do not have much control over histories created by them, and our
commit creating commands need to be usable as an ingredient for you to
write conversion tools (like filter-branch or rebase-i).

      parent reply	other threads:[~2010-03-10 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 20:07 git-rebase -i prunes commits with empty commit-message Erik Faye-Lund
2010-03-10 13:13 ` Michael Haggerty
2010-03-10 13:34   ` Erik Faye-Lund
2010-03-11 13:14     ` Erik Faye-Lund
2010-03-11 13:46       ` Erik Faye-Lund
2010-03-10 19:53   ` Junio C Hamano [this message]

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=7veijsrm19.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kusmabite@gmail.com \
    --cc=mhagger@alum.mit.edu \
    /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).