git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Santi Béjar" <santi@agolina.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Does Git really need a commit message to go with a commit?
Date: Sun, 4 Apr 2010 14:37:59 +0200	[thread overview]
Message-ID: <n2madf1fd3d1004040537jd61d70c6we5ba3b294dfc10be@mail.gmail.com> (raw)
In-Reply-To: <h2m51dd1af81004040415xc7381f6cp1bf81bcfd684b99d@mail.gmail.com>

On Sun, Apr 4, 2010 at 1:15 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Sat, Apr 3, 2010 at 22:26, Santi Béjar <santi@agolina.net> wrote:
>> On Sun, Apr 4, 2010 at 12:06 AM, Ævar Arnfjörð Bjarmason
>> <avarab@gmail.com> wrote:
>>> git-commit(1) doesn't allow you to make a commit without a commit
>>> message. This is annoying and doesn't properly preserve history in
>>> applications like snerp-vortex which replay a SVN dump into Git. You
>>> have to add `$msg = "Git made me do it" unless length $msg' somewhere.
>>>
>>> Is there really no way to add a commit with no message with the git
>>> tools? Will anything break if I manually construct a commit with no
>>> message? Are commit messages inherently part of the format or does
>>> git-commit(1) just think it knows better than me?
>>
>> Normally it does not make sense an empty commit message, so it is
>> forbidden by default. But there is a flag (documented in the man page)
>> since v1.5.4 (v1.5.3.7-994-g36863af git-commit --allow-empty,
>> 2007-12-03) to allow it.
>
> Actually --allow-empty allows you to commit an empty /tree/. It
> doesn't do anything for the commit message itself.

Arg! You are right, sorry for the noise. I should not write emails
during the night...

I then suppose your only option is to use plumbing commands (see
git(1)), in this case git-commit-tree. In general if you write scripts
around git you should use only plumbing commands as they don't change
the behavior.

HTH,
Santi

  parent reply	other threads:[~2010-04-04 12:38 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-03 22:06 Does Git really need a commit message to go with a commit? Ævar Arnfjörð Bjarmason
2010-04-04  1:58 ` Avery Pennarun
     [not found] ` <p2kadf1fd3d1004031526r3beff4e3ldd977dfc7e9da782@mail.gmail.com>
     [not found]   ` <h2m51dd1af81004040415xc7381f6cp1bf81bcfd684b99d@mail.gmail.com>
2010-04-04 12:37     ` Santi Béjar [this message]
2010-04-04 14:49 ` [PATCH] Add option to git-commit to allow empty log messages Ævar Arnfjörð Bjarmason
2010-04-04 22:43   ` David Aguilar
2010-04-04 23:53     ` Ævar Arnfjörð Bjarmason
2010-04-05  2:11       ` Junio C Hamano
2010-04-05  2:15         ` Sverre Rabbelier
2010-04-05  3:57           ` Junio C Hamano
2010-04-05 14:46             ` Sverre Rabbelier
2010-04-05  5:10         ` Miles Bader
2010-04-05  5:27           ` Junio C Hamano
2010-04-05  5:51           ` Jeff King
2010-04-05 12:50             ` Ævar Arnfjörð Bjarmason
2010-04-05 17:58               ` Jonathan Nieder
2010-04-05 18:11                 ` Jonathan Nieder
2010-04-06  5:55                 ` Jeff King
2010-04-06  8:40                   ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2010-04-07  5:16                     ` Junio C Hamano
2010-04-07 14:28                       ` Ævar Arnfjörð Bjarmason
2010-04-06  8:42                   ` [PATCH] " Ævar Arnfjörð Bjarmason
2010-04-07 15:09                     ` [PATCH] Remove --allow-empty from the git-commit synopsis Ævar Arnfjörð Bjarmason
2010-04-07 15:29                       ` Sverre Rabbelier
2010-04-07 17:28                         ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2010-04-07 17:52                           ` Sverre Rabbelier
2010-04-07 18:17                             ` Ævar Arnfjörð Bjarmason
2010-04-07 18:21                           ` Tay Ray Chuan
2010-04-07 18:48                             ` [PATCH v3] " Ævar Arnfjörð Bjarmason
2010-04-07 18:55                           ` [PATCH v2] " Johannes Sixt
2010-04-07 19:00                           ` Junio C Hamano
2010-04-07 19:28                             ` [PATCH v4] " Ævar Arnfjörð Bjarmason
2010-04-07 19:45                               ` Stephen Boyd
2010-04-07 22:25                             ` [PATCH v2] " Junio C Hamano
2010-04-08  6:44                               ` Jeff King
2010-04-06  5:43               ` [PATCH] Add option to git-commit to allow empty log messages Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=n2madf1fd3d1004040537jd61d70c6we5ba3b294dfc10be@mail.gmail.com \
    --to=santi@agolina.net \
    --cc=avarab@gmail.com \
    --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.
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).