user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: "W. Trevor King" <wking@tremily.us>
Cc: meta@public-inbox.org
Subject: Re: [RFC] ssoma-mda: Use the email subject as the commit message
Date: Sat, 18 Oct 2014 21:04:00 +0000	[thread overview]
Message-ID: <20141018210400.GA2448@dcvr.yhbt.net> (raw)
In-Reply-To: <af679af8257e250ac606e35a1307ad02907b8426.1413663212.git.wking@tremily.us>

"W. Trevor King" <wking@tremily.us> wrote:
> This is more interesting than just using 'mda' all the time, but it's
> harder to setup proper quoting around the message without using
> third-party Perl modules (e.g. IPC::Run or String::ShellQuote).  This
> proof-of-concept patch just assumes the subject doesn't contain
> single-quotes (').  This patch also doesn't handle the empty/missing
> subject case, which should probably fall back to '<no subject>' or
> some such.

Right, carelessness here would open us up to command injection.  It
would also need to work with internationalized subjects.  I considered
it for public-inbox-mda; but decided it was not worth the trouble.

> It would also be useful (I think) to set the GIT_AUTHOR_NAME,
> GIT_AUTHOR_EMAIL, and GIT_AUTHOR_DATE environment variables from the
> message header before committing.  I know how to do that using
> Python's subprocess module, but I don't know the Perl incantation.

That's done in public-inbox-mda using

	local $ENV{...} = ...

And more Email::* modules to properly decode various email addresses and
internationalized names.  I wanted to keep ssoma as lean and dumb as
possible.

> Is there any interest in a Python port of ssoma?  The subprocess
> handling in Perl's standard libraries is not my favorite ;).  I expect
> we could handle all of ssoma without leaving Python's standard
> libraries.  For an example of a related Perl -> Python rewrite that I
> just landed, see nmbug [1,2,3].

I think you're the only one who's shown any interest in ssoma at all :)
I would love to have multiple implementations of ssoma and want a Ruby
one, too.  However I don't think using Python/Ruby would increase it's
ease-of-installation or adoption much (and most of my software is Ruby).

Fwiw, the commit subject/message currently has no bearing on the way
ssoma or public-inbox handles the mail data.  So another implementation
is free to use more metadata in the commit message.

I've considered adding fuzzy generation counters to commit messages to
public-inbox to allow easier history traversals; but decided it's
probably better to do in any out-of-band, easily-regenerated store
using sqlite or similar (this may help with adding search support to
the web UI as well).

  reply	other threads:[~2014-10-18 21:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 20:19 [RFC] ssoma-mda: Use the email subject as the commit message W. Trevor King
2014-10-18 21:04 ` Eric Wong [this message]
2014-10-18 21:50   ` W. Trevor King
2014-10-18 23:43     ` Eric Wong
2014-10-19  3:48       ` W. Trevor King
2014-10-19  5:30         ` Eric Wong
2014-10-19 17:31           ` W. Trevor King
2014-10-20  0:49             ` Eric Wong
2014-10-20 15:36               ` W. Trevor King
2014-10-20 19:26                 ` Eric Wong
2014-10-20 19:53                   ` W. Trevor King
2014-10-26 22:57         ` Eric Wong
2014-10-27  0:19           ` W. Trevor King

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: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141018210400.GA2448@dcvr.yhbt.net \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=wking@tremily.us \
    /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/public-inbox.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).