git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Bobby Powers <bobbypowers@gmail.com>,
	git@vger.kernel.org, gitster@pobox.com,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH] cherry-pick: Add an option to prepend a string to the commit message
Date: Sat, 12 Jun 2010 04:19:25 -0400	[thread overview]
Message-ID: <20100612081925.GA19525@coredump.intra.peff.net> (raw)
In-Reply-To: <20100612071850.GA2765@burratino>

On Sat, Jun 12, 2010 at 02:18:50AM -0500, Jonathan Nieder wrote:

> Subject: Documentation: explain use of cherry-pick -n in scripts
> 
> Add an example to indicate how to munge a commit while cherry-picking it.
> 
> The formatting is ugly because I do not know how to ask asciidoc to
> use a multiline heading in a definition list.

I don't think there is a way to do what you want. Even an explicit " +"
at the end of line, which is supposed to cause a line-break, doesn't
seem to work.

However, I wonder if all of the examples should actually be in "----"
listing blocks. That would generally render them in a monospaced
typewriter font (though in the manpage, it doesn't matter much), and
your multiline addition would be rendered properly, too.

> +------------
> +git checkout maint &&
> +git cherry-pick -n bugfix &&
> +git add new_file.txt &&
> +git show -s bugfix --format='%s%n%n%b%n%nAlso add a new file.' |
> +git commit -F -
> +------------

You can use the much shorter "%B" instead of "%s%n%n%b" these days, and
as a bonus, it will use the right number of newlines for a subject-only
commit.

-Peff

  reply	other threads:[~2010-06-12  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12  5:07 [PATCH] cherry-pick: Add an option to prepend a string to the commit message Bobby Powers
2010-06-12  5:58 ` Jonathan Nieder
2010-06-12  6:18   ` Junio C Hamano
2010-06-12  6:28   ` Jeff King
2010-06-12  6:43     ` Bobby Powers
2010-06-12  7:18       ` Jonathan Nieder
2010-06-12  8:19         ` Jeff King [this message]
2010-06-14  5:33           ` Junio C Hamano
2010-06-14 18:03         ` Junio C Hamano

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=20100612081925.GA19525@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=bobbypowers@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.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 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).