patchwork icon indicating copy to clipboard operation
patchwork copied to clipboard

git-pw submit

Open dlespiau opened this issue 9 years ago • 0 comments

I have in mind a 'git pw submit' command that would work like git send-email but would send the git-format patches to an HTTP/REST end point. Patchwork would, then, send the emails to the ml on behalf of the author. It would help people working for companies not having proper smtp servers to send emails through.

I'd also love if that command could take care of sending successive revisions for me (either with --in-reply-to or full series depending how much has changed).

Chatting with Gabriel, a summary of the solution we are considering:

  • git pw submit -> submit all the commits from the current branch
    • branch tagged with series id ?
      • YES: update series.
      • NO: create series, tag branch
  • git pw submit list of commits -> submit only list of commits
    • Is list of commits part of the current branch Branch ?
      • YES:
        • branch tagged with series id ?
          • YES: Update series
          • NO: Create series, tag branch
      • NO: ask the user which series id he wants
  • git pw submit list of commits series id ->update series id with list of commits
  • need a --dry-run option to explain/check what the command will do
  • We need a REST entry point to submit git format-patch patches. The server side will have to:
    • prepare the final emails to send to the ml (this is so have all the right headers for the patch parsing, including msg-ids)
    • parse the emails just like parsemail.sh would do
    • send back the series id so git-pw can tag the branch with the series-id
    • send the mails to the ml on behalf of the submitter (just like mailman does) with the "Patchwork-Hint: ignore" header so the mail doesn't get parsed twice.
  • Use JSON in the POST request so we can add more fields to the submission message later on. For instance, I'm thinking that we could have a option to tell patchwork not to send the emails to the ml. This way we could create a series to share with other people and to be tested without it being a "real" submission.

dlespiau avatar Nov 13 '15 10:11 dlespiau