git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: "Vít Ondruch" <vondruch@redhat.com>, git@vger.kernel.org
Subject: Re: Is there a way to get the "format-patch" formatted file name?
Date: Fri, 01 Sep 2023 08:53:14 -0700	[thread overview]
Message-ID: <xmqqwmx9ritx.fsf@gitster.g> (raw)
In-Reply-To: <ZPHEOYyyX+l3AGP1@ugly> (Oswald Buddenhagen's message of "Fri, 1 Sep 2023 13:00:09 +0200")

Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:

> but i wouldn't be opposed to for example git-mailinfo learning to
> understand the --pretty argument, if the implementation doesn't turn
> out to be completely out of proportion.

Excellent suggestion.  I agree that 'mailinfo' would be the closest
place we have for such a new feature.  It's "info" output (i.e. what
comes out to the standard output of the command) is designed to be
extensible, and I vaguely recall that we indeed have added new
field(s) during its lifetime with existing users already.

We can just invent a new label (e.g. "Filesystem-safe-subject:"),
pass the subject string to pretty.c:format_sanitized_subject() and
emit the result next to the existing "Subject:" with that label, and
we can even do so unconditionally without breaking anybody.


Having it in 'mailinfo' may still not be a good solution to the
issue, given that Vit says

>> But I typically don't have a Git.

though.


On a related not-so-distant tangent, we probably should redo the
support for --message-id to emit it as an extra entry to the "info"
output, instead of contaminating the "message" output.  The option
was added only to support "git am --message-id", and as long as the
calling "am" and "mailinfo" are updated in sync to use the "info"
output to carry the Message-Id: information, we should be able to do
such a clean-up without changing the externally visible behaviour.

  reply	other threads:[~2023-09-01 15:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  9:49 Is there a way to get the "format-patch" formatted file name? Vít Ondruch
2023-08-31 11:04 ` Oswald Buddenhagen
2023-08-31 12:13   ` Vít Ondruch
2023-08-31 12:46     ` Oswald Buddenhagen
2023-08-31 17:19 ` Junio C Hamano
2023-09-01  8:56   ` Vít Ondruch
2023-09-01 11:00     ` Oswald Buddenhagen
2023-09-01 15:53       ` Junio C Hamano [this message]
2023-09-01 16:04         ` Junio C Hamano
2023-09-01 16:37         ` Vít Ondruch

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=xmqqwmx9ritx.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=vondruch@redhat.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).