GNU bug report logs -
#60147
30.0.50; vc-prepare-patch: Add numbered patch file names
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Sat, 17 Dec 2022 05:42:01 UTC
Severity: normal
Found in version 30.0.50
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 60147 <at> debbugs.gnu.org (full text, mbox):
Sean Whitton <spwhitton <at> spwhitton.name> writes:
> Hello,
>
> On Sat 17 Dec 2022 at 09:33AM GMT, Philip Kaludercic wrote:
>
>>> + (filename
>>> + (concat
>>> + (string-trim
>>> + (replace-regexp-in-string
>>> + "\\W" "-" (if (length> stripped-subject 50)
>>> + (substring stripped-subject 0 50)
>>> + stripped-subject))
>>
>> Is limiting the file names to ~50 characters a Git thing?
>
> Git does it, yes, and I thought it seemed like a good idea in general.
OK, then it should be a good convention. And if the file names are
numbered, then there shouldn't be any conflicts when downloading
patches.
>>> + (mml-attach-buffer
>>> + (buffer-name (plist-get patch :buffer))
>>> + "text/x-patch"
>>> + patch-subject
>>> + "attachment"
>>> + (format "%04d-%s" (cl-incf i) filename))))))
>>
>> Is the new additional argument really necessary, or couldn't we just
>> rename the generated buffer? We could specify that the buffer must be
>> fresh/renameable.
>
> The description and the filename for an attachment are not the same
> thing -- I don't believe MUAs will save the files with the correct name
> unless there is the filename= field. And I think it's a useful general
> addition to mml-attach-buffer.
I see, in that case this should be fine. Can you apply the patch?
This bug report was last modified 2 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.