From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 924661F66F for ; Sun, 1 Nov 2020 17:29:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727147AbgKAR2x (ORCPT ); Sun, 1 Nov 2020 12:28:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbgKAR2w (ORCPT ); Sun, 1 Nov 2020 12:28:52 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32DBDC0617A6 for ; Sun, 1 Nov 2020 09:28:52 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id s9so11907913wro.8 for ; Sun, 01 Nov 2020 09:28:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=XdA++MRqJSgWVqrx76LuRSmxfv96ZIAz/oLur7BIroQ=; b=spfJ7YdENuL+hJo4nhK7gn8Y0kZ+2rhjQMaDSHM0wUnUUjxI0uSKtTuh77FHdIJkYD oTOsFvKo1F/03pBgJa5asQB7gPx9ME7OE3jwcazoq5TqmlIKYEv4iqiinAP0yRkPmc8Q tu+CcaSVYqaDXMmu+4dt1bouHjGNHydBJPreu5/LHVWBc6DYfrkVbxrDykWfQgZMhIcm IopHGFhg5HBIf00dMR7cZs5KknIFmx/+ZE7fV8dxwI3yDzQ8lG7k0niYEwCRCcPCHhjD zh9WAc0VNs+MoYRaX283WPMrmcPEqp/IXnwc3nK7Cu9VwOSAPmEJjUjNfiXf8vA6aKVT HTGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=XdA++MRqJSgWVqrx76LuRSmxfv96ZIAz/oLur7BIroQ=; b=T4o1T+8MKamRC6DxgUpwBxFPmNWS9QV0wbaZqp8eAxy2RYnn7qYz/j9AcB8Q4tXpXE pI78pfGrx50CyvcRrv1Eiyu+NOs6EoPTbKBpQAhBJ4aPSTz8+Dfl6A0QRpPq901/8K0t AVAoh4vutV/9ThOo6h6eayZVh+zyNjeoVy/KkfzgR7ccLuTPS8/KrV/pOPtaVI+YbGHI 3dHDCK20/bf4dSKnaEQ5BKaiu8MPeVA/ucnJUUT0HpTuzSSj2YZbSA0H4Q57cr4rgMl8 8Qrqo87cJmR8Haqc+p0qhBczDbhur6UOC2X7Wmb7uJiBBb77XsjdmnEP6O1N06seS18g 28Cw== X-Gm-Message-State: AOAM531iexgBZi3SviJJxYC10uK3JHSJz7rVVFKMywKi2O8diK1wxz1q h6AazY+PXWrf3OLy1jdd+OtAYo1a264= X-Google-Smtp-Source: ABdhPJyG49zsJ4IjasNaHA1EEaDDWCP2tNtrJeBCD9bJwke6hUMjQFUbAxJUrXiXH8M4jNRmcyAsag== X-Received: by 2002:adf:914c:: with SMTP id j70mr16249614wrj.170.1604251730697; Sun, 01 Nov 2020 09:28:50 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u15sm19217449wrm.77.2020.11.01.09.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Nov 2020 09:28:50 -0800 (PST) Message-Id: <6c44b1c576150212cfb23c6f3d0ca3563ddf4556.1604251728.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Philippe Blain via GitGitGadget" Date: Sun, 01 Nov 2020 17:28:41 +0000 Subject: [PATCH v2 2/8] doc: line-range: improve formatting Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: Philippe Blain , Philippe Blain , Philippe Blain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philippe Blain Improve the formatting of the description of the line-range option '-L' for `git log`, `gitk` and `git blame`: - Use bold for , and - Use backticks for literals Signed-off-by: Philippe Blain --- Documentation/blame-options.txt | 4 ++-- Documentation/line-range-format.txt | 24 ++++++++++++------------ Documentation/line-range-options.txt | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 88750af7ae..48bf0eeec5 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -14,8 +14,8 @@ Annotate only the given line range. May be specified multiple times. Overlapping ranges are allowed. + - and are optional. ``-L '' or ``-L ,'' spans from - to end of file. ``-L ,'' spans from start of file to . +'' and '' are optional. `-L ` or `-L ,` spans from +'' to end of file. `-L ,` spans from start of file to ''. + include::line-range-format.txt[] diff --git a/Documentation/line-range-format.txt b/Documentation/line-range-format.txt index 829676ff98..43759eef89 100644 --- a/Documentation/line-range-format.txt +++ b/Documentation/line-range-format.txt @@ -1,30 +1,30 @@ - and can take one of these forms: +'' and '' can take one of these forms: - number + -If or is a number, it specifies an +If '' or '' is a number, it specifies an absolute line number (lines count from 1). + -- /regex/ +- `/regex/` + This form will use the first line matching the given -POSIX regex. If is a regex, it will search from the end of +POSIX regex. If '' is a regex, it will search from the end of the previous `-L` range, if any, otherwise from the start of file. -If is ``^/regex/'', it will search from the start of file. -If is a regex, it will search -starting at the line given by . +If '' is `^/regex/`, it will search from the start of file. +If '' is a regex, it will search +starting at the line given by ''. + - +offset or -offset + -This is only valid for and will specify a number -of lines before or after the line given by . +This is only valid for '' and will specify a number +of lines before or after the line given by ''. + -If ``:'' is given in place of and , it is a +If `:` is given in place of '' and '', it is a regular expression that denotes the range from the first funcname line -that matches , up to the next funcname line. ``:'' +that matches '', up to the next funcname line. `:` searches from the end of the previous `-L` range, if any, otherwise -from the start of file. ``^:'' searches from the start of +from the start of file. `^:` searches from the start of file. diff --git a/Documentation/line-range-options.txt b/Documentation/line-range-options.txt index 266263f6b4..1c90127300 100644 --- a/Documentation/line-range-options.txt +++ b/Documentation/line-range-options.txt @@ -1,12 +1,12 @@ -L,::: -L:::: - Trace the evolution of the line range given by "," - (or the function name regex ) within the . You may + Trace the evolution of the line range given by ',' + (or the function name regex '') within the ''. You may not give any pathspec limiters. This is currently limited to a walk starting from a single revision, i.e., you may only give zero or one positive revision arguments, and - and (or ) must exist in the starting revision. + '' and '' (or '') must exist in the starting revision. You can specify this option more than once. Implies `--patch`. Patch output can be suppressed using `--no-patch`, but other diff formats (namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`, -- gitgitgadget