git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Erik Cervin Edin <erik@cervined.in>, git@vger.kernel.org
Subject: Re: git notes question
Date: Wed, 09 Mar 2022 10:02:51 -0800	[thread overview]
Message-ID: <xmqqee3bm2b8.fsf@gitster.g> (raw)
In-Reply-To: <d204419925e7a4486d9a66a8a0f807a77be6d1b7.camel@gmail.com> ("Nuno Sá"'s message of "Wed, 09 Mar 2022 10:11:16 +0100")

Nuno Sá <noname.nuno@gmail.com> writes:

> AFAICT, git-format-patch looks to be using --pretty=email and I think
> we can use --pretty in git-format-patch but having to mimic the email
> format "by hand" is just painful and I was hoping a better way could
> exist.

Well, this time it was "Notes:" label, but the next person who
wants to see a deviation from the canned "email" format would want a
deviation different from yours.  Perhaps they want a different way
to format the author name?  Perhaps they want a different way to
separate the title (to be on the "Subject:" line) out of the commit
message?  Perhaps they want to see the log message be indented?
Perhaps they want to see the message from the notes be line-wrapped?
Perhaps they want to see the message from the notes not to be
indented?  Perhaps they want to see the "Notes (amlog):" label to
format the name of the notes tree differently?

Where would that end?  We have to draw the line somewhere.

The customizability via --format=<template> is given for these
people who want to futz with that line.  One thing that may be a
good little project to help them is to make sure that the vanilla
"--pretty=email" can be reimplemented as "--format=<template>" (I
doubt it is), design a way to fill the gaps (if there are) to get
there.  Once that is done, write down the "--format=<template>" that
is equivalent to "--pretty=email" somewhere in the doc, to give
those who want to derive from the canned format some reasonable
starting point.

  reply	other threads:[~2022-03-09 18:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 13:08 git notes question Nuno Sá
2022-03-09  8:54 ` Erik Cervin Edin
2022-03-09  9:11   ` Nuno Sá
2022-03-09 18:02     ` Junio C Hamano [this message]
2022-03-10  8:37       ` Nuno Sá
2022-03-10 13:11         ` Erik Cervin Edin
2022-03-10 13:26           ` Nuno Sá
2022-03-10 17:52         ` Junio C Hamano
2022-03-11  9:02           ` Nuno Sá

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=xmqqee3bm2b8.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=erik@cervined.in \
    --cc=git@vger.kernel.org \
    --cc=noname.nuno@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).