From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH v4] git-am: add option to extract email Message-Id: tag into commit log Date: Wed, 2 Jul 2014 17:51:13 +0300 Message-ID: <1404312673-11836-1-git-send-email-avi@cloudius-systems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Jul 02 16:51:39 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X2Lsj-0007lE-Ms for gcvg-git-2@plane.gmane.org; Wed, 02 Jul 2014 16:51:34 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754588AbaGBOva convert rfc822-to-quoted-printable (ORCPT ); Wed, 2 Jul 2014 10:51:30 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:34799 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754093AbaGBOv3 (ORCPT ); Wed, 2 Jul 2014 10:51:29 -0400 Received: by mail-wg0-f43.google.com with SMTP id b13so903166wgh.14 for ; Wed, 02 Jul 2014 07:51:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=buMoy0Bq6twyYG3fHq7b7OM640xBg3PWl0AQQ4bjNPE=; b=XFmjpC50QCETPtU9oKVhDge1KNvpOmD+qYKoYPMpHp/Id/w+tcVAQ6RYhp3qW4AkSO mZpFLWXGQVRVL1FE7sDHpWfl7uLl8olYqtUTcsnslOTBWgGgxsZBMLj/9xFBidb9dAVI 25BjuWUxP96I2IJC16Gqer3zjXZI3hG2f64VcYUgd8jYfTUWXVRCSJI9Ba5ytcYFe4eR nhKtL7/6DfLFKf5moxaB2yA/84W3BEjYNO3YLtKr/lxQwQIt6aOcGYHjmp2BH5CO4x06 lhWziiSvIJQyFS7EjX8f9nU5XwToW0ASPB9kMp8E6semUrEk0/kBtrDVJ7oL0S9hGoLl 18oA== X-Gm-Message-State: ALoCoQnEhnhjFErLZdtEQFoTkynyNZlsj/OTITlxqXkljpymeOpxXAc+IIfggHB0F+p5klWoA9w0 X-Received: by 10.194.238.168 with SMTP id vl8mr3177853wjc.133.1404312688335; Wed, 02 Jul 2014 07:51:28 -0700 (PDT) Received: from avi.cloudius (84.94.198.183.cable.012.net.il. [84.94.198.183]) by mx.google.com with ESMTPSA id dt7sm55985549wic.6.2014.07.02.07.51.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jul 2014 07:51:27 -0700 (PDT) X-Mailer: git-send-email 1.9.3 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Some workflows prefer to track exactly which email message was used to generate a commit. This can be used, for example, to generate an automated acknowledgement when a patch is committed as a response to the patch email, or as a reference to the thread which introduced the patch. Support this by adding a --message-id option (abbreviated as -m) to git-am, which will then extract the message ID and append it to the email commit log. Signed-off-by: Avi Kivity --- v4: adjust coding style recover message_id variable after a resumed git-am use sane_grep drop unneeded grep error handling v3: remove bashism and unneeded quoting v2: adjust to pass test suite (t5100) Documentation/git-am.txt | 6 ++++++ builtin/mailinfo.c | 2 +- git-am.sh | 14 +++++++++++++- t/t5100/info0004 | 1 + t/t5100/info0005 | 1 + t/t5100/info0012 | 1 + 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 9adce37..8a251a1 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -15,6 +15,7 @@ SYNOPSIS [--whitespace=3D