From: Jeremiah Mahler <jmmahler@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Jeremiah Mahler <jmmahler@gmail.com>
Subject: [PATCH v2] format-patch --signature-file <file>
Date: Thu, 15 May 2014 18:31:20 -0700 [thread overview]
Message-ID: <1400203881-2794-1-git-send-email-jmmahler@gmail.com> (raw)
On Tue, May 13, 2014 at 09:07:12AM -0700, Jonathan Nieder wrote:
> Hi,
>
> Jeremiah Mahler wrote:
>
> > # from a string
> > $ git format-patch --signature "from a string" origin
> >
> > # or from a file
> > $ git format-patch --signature ~/.signature origin
>
> Interesting. But... what if I want my patch to end with
>
> --
> /home/jrnieder/.signature
>
> ? It seems safer to introduce a separate --signature-file option.
>
It is probably smarter to avoid that corner case entirely.
Good idea.
> [...]
> > builtin/log.c | 26 ++++++++++++++++++++++++--
> > 1 file changed, 24 insertions(+), 2 deletions(-)
>
> Tests?
>
I added a test which checks that a valid patch is produced and that
the signature from the file appears in the output.
> Thanks and hope that helps,
> Jonathan
In addition to addressing the suggestions from Jonathan I also
updated the Documentation.
This solution uses a static buffer to store the signature which does
create a size limitation (1024 bytes). I considered a solution
using malloc but I could not figure out a clean way of determining when
to free the memory.
Thanks for the help and suggestions.
Jeremiah Mahler (1):
format-patch --signature-file <file>
Documentation/git-format-patch.txt | 7 +++++++
builtin/log.c | 24 ++++++++++++++++++++++++
t/t4014-format-patch.sh | 13 +++++++++++++
3 files changed, 44 insertions(+)
--
Jeremiah Mahler
jmmahler@gmail.com
http://github.com/jmahler
next reply other threads:[~2014-05-16 1:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 1:31 Jeremiah Mahler [this message]
2014-05-16 1:31 ` [PATCH v2] format-patch --signature-file <file> Jeremiah Mahler
2014-05-16 8:14 ` Jeff King
2014-05-17 7:25 ` Jeremiah Mahler
2014-05-17 7:42 ` Jeff King
2014-05-17 8:59 ` Jeremiah Mahler
2014-05-17 10:00 ` Jeff King
2014-05-17 15:39 ` Jeremiah Mahler
2014-05-19 16:54 ` Junio C Hamano
2014-05-20 5:46 ` Jeremiah Mahler
2014-05-20 6:21 ` Jeff King
2014-05-20 15:06 ` Junio C Hamano
2014-05-21 0:45 ` Jeremiah Mahler
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=1400203881-2794-1-git-send-email-jmmahler@gmail.com \
--to=jmmahler@gmail.com \
--cc=git@vger.kernel.org \
--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).