All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Webb <chris@arachsys.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Neil Horman <nhorman@tuxdriver.com>
Subject: Re: Cherry-picking commits with empty messages
Date: Thu, 2 Aug 2012 09:55:59 +0100	[thread overview]
Message-ID: <20120802085554.GI19416@arachsys.com> (raw)
In-Reply-To: <7vd33afqjh.fsf@alter.siamese.dyndns.org>

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

> 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.

Thanks for the very detailed analysis and advice Junio. I like your
suggested --allow-empty-message option for cherry-pick because it's
consistent with the same option in standard commit, and doesn't change the
behaviour for existing users who might rely on cherry-pick catching blank
messages.

With rebase -i, the fix might be slightly more involved than just passing
through --allow-empty-message (if given) to cherry-pick, especially given
that sometimes we git cherry-pick -n && git commit --allow-empty-message,
and at other times we do standard git cherry-pick which refuses to pick a
commit without a message.

Given a history with empty commits, as a general principle it feels like it
should be possible to edit or reword those commits to make them non-empty
without giving --allow-empty-message, but that to generate new history
containing empty messages, --allow-empty-message should be required, whether
to commit [--amend] during rebase, or to the rebase -i command itself.

Cheers,

Chris.

  parent reply	other threads:[~2012-08-02  8:56 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
2012-08-01 22:26     ` Junio C Hamano
2012-08-02 10:10       ` Angus Hammond
2012-08-02  8:55   ` Chris Webb [this message]
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

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

  git send-email \
    --in-reply-to=20120802085554.GI19416@arachsys.com \
    --to=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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.