From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eric Blake <eblake@redhat.com>, git@vger.kernel.org
Subject: Re: [PATCH] notes: mention --notes in more places
Date: Wed, 17 Oct 2012 14:50:06 -0700 [thread overview]
Message-ID: <7vsj9cn4z5.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20121017190507.GA17648@sigill.intra.peff.net> (Jeff King's message of "Wed, 17 Oct 2012 15:05:07 -0400")
Jeff King <peff@peff.net> writes:
> On Wed, Oct 17, 2012 at 07:30:56AM -0600, Eric Blake wrote:
>
>> > We've talked about it several times, but it's never happened (probably
>> > because most people don't actually use notes).
>>
>> And people (like me) don't use notes because they aren't documented.
>> Catch-22, so we have to start somewhere.
>
> Oh, I definitely agree your patch is the right direction. I was just
> explaining why it hasn't happened, even though people think it's a good
> idea.
>
>> I'll submit a v2 with the non-controversial edits, and spend some time
>> trying to figure out how to isolate the portion of pretty-options.txt
>> that is relevant to format-patch. If it's easy enough, I can also
>> consider using --- instead of Notes: as the separator when using
>> format-patch.
>
> Hmm. After digging in the archive, it seems we (including both you and
> me!) have discussed this several times, and there are even some patches
> floating around. Maybe one of them would be a good starting point for
> your submission (I did not read carefully over all of the arguments for
> each):
Thomas's oldest one looked like a good starting point but we've
gained a codepath to spit out the contents of notes since then, which
probably needs to be killed at least for this codepath.
A few problems I noticed while looking at log-tree.c and pretty.c
* pretty_print_commit() shows notes at the end of existing
message. There is no provision for the callers to affect what
comes between the existing log message and the notes text.
* show_log() has the "add-signoff" that appends a sign-off after
whatever pretty_print_commit() gives.
Taken together, they make it unnecessarily cumbersome to inject a
new sign-off and "---" between the log message and notes.
The easiest is to add another parameter to pretty_print_commit that
is inserted immediately after the log message before notes are
appended. That way, we can update show_log() to first format
additional sign off (if needed) and then "---\n" (again, if needed)
to a new strbuf and pass it as the new argument when calling the
pretty_print_commit() function.
next prev parent reply other threads:[~2012-10-17 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 3:19 [PATCH] notes: mention --notes in more places Eric Blake
2012-10-17 5:14 ` Junio C Hamano
2012-10-17 5:51 ` Jeff King
2012-10-17 6:25 ` Junio C Hamano
2012-10-17 13:30 ` Eric Blake
2012-10-17 19:05 ` Jeff King
2012-10-17 21:50 ` Junio C Hamano [this message]
2012-10-18 12:11 ` Michael J Gruber
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=7vsj9cn4z5.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=eblake@redhat.com \
--cc=git@vger.kernel.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).