git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Miles Bader <miles@gnu.org>, Junio C Hamano <gitster@pobox.com>,
	David Aguilar <davvid@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Add option to git-commit to allow empty log messages
Date: Mon, 5 Apr 2010 12:50:11 +0000	[thread overview]
Message-ID: <o2h51dd1af81004050550v9427b9flfb13a9e1ad4056a@mail.gmail.com> (raw)
In-Reply-To: <20100405055139.GA28730@coredump.intra.peff.net>

On Mon, Apr 5, 2010 at 05:51, Jeff King <peff@peff.net> wrote:
> So yes, it sucks that his importer does not support empty comments, and
> that the OP had to hack around it. But it already doesn't support many
> things (like commits with a large number of files, and from what I can
> see, files with spaces will break his `find` invocation). The right
> answer is for him to move to fast-import, which will be way faster, more
> robust, and is actually a supported plumbing interface.

Thanks for looking at the importer, that'll be very useful when fixing
it. But FWIW that `find` invocation isn't a bug. Perl doesn't have a "
" input field separator so "my @files = `find . -type f`" does the
right thing, unlike in the shell.

> I don't think it's worth adding new features to support a scripting
> interface that we are trying to discourage. And I haven't seen another
> argument in favor of empty commits besides importing.  Are people
> really wanting to make empty commit messages while using git itself?

I'm sorry that I brought snerp-vortex into this at all. It wasn't the
main motivation behind this patch, just the straw that broke the
camel's back.

I've run into this limitation a lot when playing with and learning
Git. Sometimes I'm e.g. making small throwaway repositories in /tmp
using the porcelain for  experimentation. Those have seen a lot of
"blah!" commit messages immediately following "Git exited abnormally
with code 1".

Miles Bader said it better than I could. Tools should provide sane
defaults and discourage bad practices, but they shouldn't *enforce*
good practices. That'll inevitably burn people whose use for the tools
isn't what you expect.

Even if they Git maintainers don't like this people *do* write
automated scripts and wrappers around Git using the porcelain, simply
because that's what they're used to. Learning to use and switching to
something like git-fast-import(1) or git-commit-tree(1) is too big of
a hurdle for small throwaway scripts that take ~1m to write and aren't
big dedicated importers like snerp-vortex.

There's probably a lot of code out there doing `git commit -m"Yet
another revision"' from some cron job. I sprinkled a lot of such
meaningless messages about when I switched from Subversion (which
supports empty commits in the porcelain) for these automated jobs to
Git.

Of course Junio may disagree (and that's fine!), how much you babysit
your users is ultimately a design decision up to the maintainer. I
just find this inconsistent with the rest of the porcelain which
usually gives me plenty of ammo to blow both my legs of (and the
planet they were standing on) if I so choose :)

  reply	other threads:[~2010-04-05 12:50 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
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 [this message]
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=o2h51dd1af81004050550v9427b9flfb13a9e1ad4056a@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=miles@gnu.org \
    --cc=peff@peff.net \
    /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).