git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Angus Hammond <angusgh@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Chris Webb <chris@arachsys.com>,
	git@vger.kernel.org, Neil Horman <nhorman@tuxdriver.com>
Subject: Re: Cherry-picking commits with empty messages
Date: Wed, 1 Aug 2012 19:15:16 +0100	[thread overview]
Message-ID: <CAOBOgRZ9Ouan2htT9m3qBrUvae3nT1az3A61kiRMSJNyFv1MdQ@mail.gmail.com> (raw)
In-Reply-To: <7vd33afqjh.fsf@alter.siamese.dyndns.org>

>    But from the bigger UI consistency point of view, it would be
>    chaotic to change the default of some options for a single
>    command depending on the nature of the operand, so I would
>    recommend against going this route, and pick one view between
>    "give the user a chance to fix" or "the user must have done so on
>    purpose" and apply it consistently.
>
> My recommendation, backed by the above line of thought, is to add
> support for the "--allow-empty-message" option to both "rebase [-i]"
> and "cherry-pick", defaulting to false.

Though I completely agree regarding having a consistent UI that
doesn't change it's behaviour based on the operand, I'd argue that
--allow-empty-message should default to true on cherry-pick for a
couple or reasons. Firstly, in the case that git perpetuates an empty
commit message that the user does not want, it is only damaging a
repository in a way that it is already damaged, clearly this still
isn't ideal, but it's certainly not as bad as damaging a repository
that's pristine. Arguably it's the user's responsibility to ensure
they don't TELL git to perpetuate their own bad commit.

Secondly, I'd don't like the idea of a command that 99.9% of the time
will run completely independently, but then every so often will become
interactive. This is probably a rare enough scenario that script
writers would reasonably assume that cherry-pick (without the
--allow-empty-message flag) is not an interactive command and write
their scripts accordingly. A user who made use of empty commit
messages would find any such scripts crashing on them or producing
strange results. Even if this is the fringe case, it seems to be a
substantially worse fringe case than that where we make a commit that
has no message at the user's instruction.

Thanks
Angus

  reply	other threads:[~2012-08-01 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 11:16 Cherry-picking commits with empty messages Chris Webb
2012-08-01 17:52 ` Junio C Hamano
2012-08-01 18:15   ` Angus Hammond [this message]
2012-08-01 22:26     ` Junio C Hamano
2012-08-02 10:10       ` Angus Hammond
2012-08-02  8:55   ` Chris Webb
2012-08-02 10:38     ` [PATCH] cherry-pick: add --allow-empty-message option Chris Webb
2012-08-06 10:57       ` Neil Horman
2012-08-06 11:00         ` Chris Webb
2012-08-06 11:11           ` Neil Horman
2012-08-03  0:22   ` Cherry-picking commits with empty messages Neil Horman

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=CAOBOgRZ9Ouan2htT9m3qBrUvae3nT1az3A61kiRMSJNyFv1MdQ@mail.gmail.com \
    --to=angusgh@gmail.com \
    --cc=chris@arachsys.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nhorman@tuxdriver.com \
    /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).