From patchwork Thu Jul 2 14:08:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Couder X-Patchwork-Id: 11638997 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F0BA618 for ; Thu, 2 Jul 2020 14:09:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 764CA20780 for ; Thu, 2 Jul 2020 14:09:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="beLwnBkA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729335AbgGBOJD (ORCPT ); Thu, 2 Jul 2020 10:09:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728516AbgGBOJC (ORCPT ); Thu, 2 Jul 2020 10:09:02 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8154DC08C5C1 for ; Thu, 2 Jul 2020 07:09:02 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id q15so26948335wmj.2 for ; Thu, 02 Jul 2020 07:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IeJ1qdXXZJ07V18yqGe0PLr0LGSPSRulA/2md5U36lA=; b=beLwnBkAAGQRI+vnFv0B0rBrEuP9Cj/ZPXhOmEpZX+iMeYtTA7khNShAi2t7oxUdVD 3E9q1nobni89usgM/V7FqpelrT5ftsY1kiN7MQHfMXdpjNemsqdeh91AEIDQFClTGWE4 RTV4ndgURqpCxKTOxfHdCbLnYBEdD74NG5w12qLaboo6u2KFsYGzedabvQecPg2NpVg1 6CsOq4fOyrvoathn6IEECllPIMR428MuHVMtDjNExiiL+B5jt/vUcBh72obUTL803lna Ifti90+HtToHqNImBVIxemzbxxZabJP2uRj2ORuAN/qEPbXtvmczKBPViqeGghZyxeKy T70g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IeJ1qdXXZJ07V18yqGe0PLr0LGSPSRulA/2md5U36lA=; b=oPZWSJgYubA5o+qtNi4mBBAeaVrEMrupkAI9SRMmw/Jb1Q6YNNu4VYtnExNr6eTroG cCKU/E3Gwem22bAfc7v20+mPpvaLUr9bINOAJ3e65lEX+v0Dc2qZVbUtH3mN2E/nVc6c n1UxKfAZTHqTuikkkab4gJjIL8BAZ1CasQcXXzQtCpMndcp536ecj9p27W+EdXvND0dq tcDCDM9y+RbMWARjD5ZEh6rgwjJCgEvL4dgF8SoRng8bBDXVKCDzV4n1s0TDIMgKLDpW Wv7p+ib60LXs1zC4p94NSFUCFYRNlT6EvoYROB4Ug/u3rmk1YUIGYRoqNy7Zc61TxmPi pCxQ== X-Gm-Message-State: AOAM532Atw603q26eYtB9OgGWCJK+67iMIO0TjWk3qfZeHG9OcSPPNy/ B8ueaLa2tChZeOF9vabrTsPCv+92TcI= X-Google-Smtp-Source: ABdhPJymc8Azd0zjDr3lybEdpmwaKXOGVW3N7+/ckhXD9/qv1geamrDrBOaTltVCFKl0rimO8F+yDA== X-Received: by 2002:a7b:c7d2:: with SMTP id z18mr32903019wmk.149.1593698940955; Thu, 02 Jul 2020 07:09:00 -0700 (PDT) Received: from localhost.localdomain ([193.57.125.121]) by smtp.gmail.com with ESMTPSA id p17sm10265038wma.47.2020.07.02.07.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 07:09:00 -0700 (PDT) From: Christian Couder X-Google-Original-From: Christian Couder To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Christian Couder Subject: [PATCH v2 1/2] Documentation: clarify %(contents:XXXX) doc Date: Thu, 2 Jul 2020 16:08:44 +0200 Message-Id: <20200702140845.24945-2-chriscool@tuxfamily.org> X-Mailer: git-send-email 2.27.0.221.ga08a83db2b.dirty In-Reply-To: <20200702140845.24945-1-chriscool@tuxfamily.org> References: <20200702140845.24945-1-chriscool@tuxfamily.org> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Let's avoid a big dense paragraph by using an unordered list for the %(contents:XXXX) format specifiers. Suggested-by: Jeff King Signed-off-by: Christian Couder --- Documentation/git-for-each-ref.txt | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index 6dcd39f6f6..2db9779d54 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -232,12 +232,24 @@ Fields that have name-email-date tuple as its value (`author`, `committer`, and `tagger`) can be suffixed with `name`, `email`, and `date` to extract the named component. -The complete message in a commit and tag object is `contents`. -Its first line is `contents:subject`, where subject is the concatenation -of all lines of the commit message up to the first blank line. The next -line is `contents:body`, where body is all of the lines after the first -blank line. The optional GPG signature is `contents:signature`. The -first `N` lines of the message is obtained using `contents:lines=N`. +The complete message of a commit or tag object is `contents`. This +field can also be used in the following ways: + +contents:subject:: + The "subject" of the commit or tag message. It's actually the + concatenation of all lines of the commit message up to the + first blank line. + +contents:body:: + The "body" of the commit or tag message. It's made of the + lines after the first blank line. + +contents:signature:: + The optional GPG signature. + +contents:lines=N:: + The first `N` lines of the message. + Additionally, the trailers as interpreted by linkgit:git-interpret-trailers[1] are obtained as `trailers` (or by using the historical alias `contents:trailers`). Non-trailer lines from the trailer block can be omitted