From patchwork Sun Mar 30 17:16:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 14032974 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A6191F949 for ; Sun, 30 Mar 2025 17:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354971; cv=none; b=G9ZDnCofLy/gmSsvwTa4LzQGlqBnQTUIJl+k1DIbbogsvuqYFN0iBId0/7MwjuksqtL7laI66PW337lxjmETwaRvN5fDj0OZUTbTEDsfB4XApvy2CgD0nWPjq14/IvbNOXNUb8Ef0Gn3MgrSpytU1hgTJOCcYEbxJrQ6FqvOpAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354971; c=relaxed/simple; bh=l9o8h1wCbqu2yFkNl+VTPaqyav/NmLt3ZVL02MS69MU=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=R4NJjEvXJdcFxrfW+kuqXXJlYVIMSswFcT4ioEH+l6LwSej5mqdjO4r29sT7fCcjwkcfDn8ip6mXX7JCCAL23fk7RJFm7VB6ezVGuYgK2IPtJOYdBMuzrvV2zX/4aVkWdFykpGBtErFqtLp+uYNP+X9ohpgA04X/hX8fatWcGMw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QIzmm0TP; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QIzmm0TP" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43cf257158fso26723735e9.2 for ; Sun, 30 Mar 2025 10:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743354967; x=1743959767; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=V4dfVWDdoa/oas+4AdjJ4QV5gH8y7CUfBuIhB8fYOuo=; b=QIzmm0TPMLGFjXZX4DBGd+G6+HTMZWH7LGj8yWF9M81CLVZwyq5C9ylRMqOFufh0aa jOvVRZG6B6W+iS0ipoZs71mL8oPJEyhj6dew7Sk6lnzNk4+770rdIICyMkXyfqcHhSyz RsToyZDi36vNyE10b8AMjLLnm00BRfjNdfyzqUKg//fIKv2NbLRKG4J/++X3DmY7QljX IqDovhaYFhweneKjssARQmUEyFC1ZXWabPHy2f/qAXNSrP1j8H038np8Zmr7jANwJsAo B4tqzeKOSVAupT9Hc4jlSS1dzMYbjjxo7FzXkAJU1EgS3/zdq29swabh2fPmnBR3jR8k hgpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743354967; x=1743959767; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V4dfVWDdoa/oas+4AdjJ4QV5gH8y7CUfBuIhB8fYOuo=; b=c8VX0m5TqVPk1eSs0lehJ3hjip0IObVaDRyCpXGtgwLSW2KO8uqt4zPGm4d+zx7RTO JT2jcjcXhI/naQxcxIuTZgcHMHJiG83kWvZEYxEZjG44A6N8OqTvEjdezwFqhAh8sowf ibXaRKkThtK+fu6i1CrGf6L3NGqBjn12i+QTrF8nnUa+v++XnyVp5L65QPWP28ZhPNX+ xrTA6IvltoHYT+im+3F3dT2IlU18yEnvze3EoLUDuZypIi68hg2Cszo8dgL/3l7Csadp k/vc8j3oE6CMjPQN0VO8gsfWyYc7Di0LNSWAwTxx7IW9Z0HUCzr1UXDEOOjoxuTnb0FR PkWA== X-Gm-Message-State: AOJu0YzuuwwsqoZgyP2L6lKGvIUUEDonUMv20hT+OtYUjpkK6gsUnwvN dxcFXgBpRDM6jrdgma851uZU83GQvaDBlABKONifni3/CdHCauhJdfX/HQ== X-Gm-Gg: ASbGncvdGseuFsq5vv1DTv8WGRtGS4LrcyXD/fGhc70JhCncLrhBy4XnBv+CuqBah+8 05cUeInaRKKMQipM/sMpaPZySnCGKQuLnizdiyGUuG9msY2JslrKMxm4dEMfdZ7H2Jl0kRxlvKy FnN1DatZ4wGMNtCrSL6YWtLmaXf1d/kt56cXps/9C2PQJAQTfcL/i1ReA49PDihrChiGkDu7g/V ginfzuClMbPmUuKy3o4YPGO51caUhmkrVXWdRDF9lsXV4r8pe19wsYiiXG240IncgCJGxKp191R o06RiFC5tklLkxS1LiH6dhC3jl4heky/wybqjfP827cteA== X-Google-Smtp-Source: AGHT+IHdI/t3bZKKd1XsQfC9p/tGuf2GYt+uZzvNOBrNaEaQwjvJ5927PykQhMvds/1d6OwM841Ffw== X-Received: by 2002:a05:600c:8718:b0:43c:e8ca:5140 with SMTP id 5b1f17b1804b1-43db62bcfeemr51950835e9.23.1743354967010; Sun, 30 Mar 2025 10:16:07 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d8fbbfef2sm97099885e9.11.2025.03.30.10.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 10:16:06 -0700 (PDT) Message-Id: <1676b5ac628fd2898c3dab1b25d6a852cedfa6ae.1743354964.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sun, 30 Mar 2025 17:16:00 +0000 Subject: [PATCH 1/5] doc: convert git-reset to new documentation format Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= - Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use __ instead of in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila --- Documentation/git-reset.adoc | 100 +++++++++++++++++------------------ 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/Documentation/git-reset.adoc b/Documentation/git-reset.adoc index 79ad5643eed..5c73448e072 100644 --- a/Documentation/git-reset.adoc +++ b/Documentation/git-reset.adoc @@ -7,23 +7,23 @@ git-reset - Reset current HEAD to the specified state SYNOPSIS -------- -[verse] -'git reset' [-q] [] [--] ... -'git reset' [-q] [--pathspec-from-file= [--pathspec-file-nul]] [] -'git reset' (--patch | -p) [] [--] [...] -'git reset' [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [] +[synopsis] +git reset [-q] [] [--] ... +git reset [-q] [--pathspec-from-file= [--pathspec-file-nul]] [] +git reset (--patch | -p) [] [--] [...] +git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [] DESCRIPTION ----------- -In the first three forms, copy entries from `` to the index. -In the last form, set the current branch head (`HEAD`) to ``, +In the first three forms, copy entries from __ to the index. +In the last form, set the current branch head (`HEAD`) to __, optionally modifying index and working tree to match. -The ``/`` defaults to `HEAD` in all forms. +The __/__ defaults to `HEAD` in all forms. -'git reset' [-q] [] [--] ...:: -'git reset' [-q] [--pathspec-from-file= [--pathspec-file-nul]] []:: +`git reset [-q] [] [--] ...`:: +`git reset [-q] [--pathspec-from-file= [--pathspec-file-nul]] []`:: These forms reset the index entries for all paths that match the - `` to their state at ``. (It does not affect + __ to their state at __. (It does not affect the working tree or the current branch.) + This means that `git reset ` is the opposite of `git add @@ -37,30 +37,30 @@ and specifying a commit with `--source`, you can copy the contents of a path out of a commit to the index and to the working tree in one go. -'git reset' (--patch | -p) [] [--] [...]:: +`git reset (--patch | -p) [] [--] [...]`:: Interactively select hunks in the difference between the index - and `` (defaults to `HEAD`). The chosen hunks are applied + and __ (defaults to `HEAD`). The chosen hunks are applied in reverse to the index. + This means that `git reset -p` is the opposite of `git add -p`, i.e. -you can use it to selectively reset hunks. See the ``Interactive Mode'' +you can use it to selectively reset hunks. See the "Interactive Mode" section of linkgit:git-add[1] to learn how to operate the `--patch` mode. -'git reset' [] []:: - This form resets the current branch head to `` and - possibly updates the index (resetting it to the tree of ``) and - the working tree depending on ``. Before the operation, `ORIG_HEAD` - is set to the tip of the current branch. If `` is omitted, - defaults to `--mixed`. The `` must be one of the following: +`git reset [] []`:: + This form resets the current branch head to __ and + possibly updates the index (resetting it to the tree of __) and + the working tree depending on __. Before the operation, `ORIG_HEAD` + is set to the tip of the current branch. If __ is omitted, + defaults to `--mixed`. The __ must be one of the following: + -- ---soft:: +`--soft`:: Does not touch the index file or the working tree at all (but - resets the head to ``, just like all modes do). This leaves - all your changed files "Changes to be committed", as `git status` + resets the head to __, just like all modes do). This leaves + all your changed files "Changes to be committed", as `git status would put it. ---mixed:: +`--mixed`:: Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action. @@ -68,33 +68,33 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode. If `-N` is specified, removed paths are marked as intent-to-add (see linkgit:git-add[1]). ---hard:: +`--hard`:: Resets the index and working tree. Any changes to tracked files in the - working tree since `` are discarded. Any untracked files or + working tree since __ are discarded. Any untracked files or directories in the way of writing any tracked files are simply deleted. ---merge:: +`--merge`:: Resets the index and updates the files in the working tree that are - different between `` and `HEAD`, but keeps those which are + different between __ and `HEAD`, but keeps those which are different between the index and working tree (i.e. which have changes which have not been added). - If a file that is different between `` and the index has + If a file that is different between __ and the index has unstaged changes, reset is aborted. + In other words, `--merge` does something like a `git read-tree -u -m `, but carries forward unmerged index entries. ---keep:: +`--keep`:: Resets index entries and updates files in the working tree that are - different between `` and `HEAD`. - If a file that is different between `` and `HEAD` has local + different between __ and `HEAD`. + If a file that is different between __ and `HEAD` has local changes, reset is aborted. ---[no-]recurse-submodules:: - When the working tree is updated, using --recurse-submodules will +`--[no-]recurse-submodules`:: + When the working tree is updated, using `--recurse-submodules` will also recursively reset the working tree of all active submodules according to the commit recorded in the superproject, also setting - the submodules' HEAD to be detached at that commit. + the submodules' `HEAD` to be detached at that commit. -- See "Reset, restore and revert" in linkgit:git[1] for the differences @@ -104,31 +104,31 @@ between the three commands. OPTIONS ------- --q:: ---quiet:: +`-q`:: +`--quiet`:: Be quiet, only report errors. ---refresh:: ---no-refresh:: +`--refresh`:: +`--no-refresh`:: Refresh the index after a mixed reset. Enabled by default. ---pathspec-from-file=:: - Pathspec is passed in `` instead of commandline args. If - `` is exactly `-` then standard input is used. Pathspec - elements are separated by LF or CR/LF. Pathspec elements can be +`--pathspec-from-file=`:: + Pathspec is passed in __ instead of commandline args. If + __ is exactly `-` then standard input is used. Pathspec + elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]). See also `--pathspec-file-nul` and global `--literal-pathspecs`. ---pathspec-file-nul:: +`--pathspec-file-nul`:: Only meaningful with `--pathspec-from-file`. Pathspec elements are - separated with NUL character and all other characters are taken + separated with _NUL_ character and all other characters are taken literally (including newlines and quotes). -\--:: +`--`:: Do not interpret any more arguments as options. -...:: +`...`:: Limits the paths affected by the operation. + For more details, see the 'pathspec' entry in linkgit:gitglossary[7]. @@ -348,7 +348,7 @@ $ git commit ... <8> ------------ + <1> First, reset the history back one commit so that we remove the original - commit, but leave the working tree with all the changes. The -N ensures + commit, but leave the working tree with all the changes. The `-N` ensures that any new files added with `HEAD` are still marked so that `git add -p` will find them. <2> Next, we interactively select diff hunks to add using the `git add -p` @@ -458,7 +458,7 @@ working index HEAD target working index HEAD --keep B C C .... -`reset --merge` is meant to be used when resetting out of a conflicted +`git reset --merge` is meant to be used when resetting out of a conflicted merge. Any mergy operation guarantees that the working tree file that is involved in the merge does not have a local change with respect to the index before it starts, and that it writes the result out to the working tree. So if @@ -467,7 +467,7 @@ between the index and the working tree, then it means that we are not resetting out from a state that a mergy operation left after failing with a conflict. That is why we disallow `--merge` option in this case. -`reset --keep` is meant to be used when removing some of the last +`git reset --keep` is meant to be used when removing some of the last commits in the current branch while keeping changes in the working tree. If there could be conflicts between the changes in the commit we want to remove and the changes in the working tree we want to keep, From patchwork Sun Mar 30 17:16:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 14032975 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F221214B08A for ; Sun, 30 Mar 2025 17:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354971; cv=none; b=FOGEk2Dpy42C4bcpSEyxr9aP70a564hP6kVZherMrinpFqStHN/a4ZpW/zeZtaaXDPpj4lVkHbyvYFfOAXiYKyogMLfC4FvJ418qFMZV+DduVmpMwx3ZG3a7VBhjqbY2ukSWgF/x3cGybwgYjzYGli66q7mjlhFQYFqWLwG/5tU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354971; c=relaxed/simple; bh=Ov+bWOxARJlJFz+5CfnfTjPm7yGb/svi86pFG3YEniU=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=O/0eU5QjH1WPw88PshPSu7dVJHW+FZ2cSzzuVtuo0r8isi88863OV9eYokuL720qQ+p5+ebyrRBhZsEv4iQML5EkR2V3KzuvfBsLSQ9f8sbH9LAmxmMRfk/+0J17XTk+aeJ875GVHlyl/Fqp5tEkgUfxdAKze30wGkNTmV3x8/s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fW9Yp2Ku; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fW9Yp2Ku" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-3914bc3e01aso2119564f8f.2 for ; Sun, 30 Mar 2025 10:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743354968; x=1743959768; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=NAAiuglveSzsCh52fS6Ti1UlCsNRXR76NCT6qXuOosQ=; b=fW9Yp2KuEAAtmykkr6rIfQudpboxASOYOXGrFHwBwDBRkM5ttbGrx5GI0oOtqfa7iy 77WOn26OwPP4gnll5aEEDZ8PUFoRIAn3RIMLJ0jv/kOrjTBnRpV1AXZJcK/2aYkmjp6z GsO76kOxNTmr+gqh0rFGWgBHl15sfZuBrVJu0h3Uc9MMP+7GLsOdB5otT/wIDx0x6MSI sKTOAcBote8/a2dFU+/Fk36bqQHSrYfFVpNa200b1+l+10QywEQDtJ360m4NebH9TuZG 21yAdgAhKJH6RyQKHV4DXiepaqaEIZEd58ngZbi60fqcyayaVmgJTJ4WJwgz2V0uU3ds jYtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743354968; x=1743959768; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NAAiuglveSzsCh52fS6Ti1UlCsNRXR76NCT6qXuOosQ=; b=mnF5ZkMZnpEw+xPDctv1deAb36IOYPcdti/TH6xddW/kSiNT1UNOavafRm2NsmncQV qFGfFaTiXQw7wNaw0wUitgAabiW4M4MLdsANERsUW3L0v3KXsBbPlOKAEDnU23ITsowL rEmX7OhtgEKufZPdofFeWp3VuIYZcOzDP/sLMZkq7q24NQPzcNbqpHS5VEUet3IfcW27 dmGYHPFotb+TM8cs+dhu2A69A6USiiCyEWkLaaI5H9RL5Emi/PItX8LFvDINC2SUfPGR CKNtWVmqJLT17paKwl7ST2nrpCtL9bjCgLwEWUAJoVfNdrcTWZGVx1rOrE1CCBc3ttJ8 5P6Q== X-Gm-Message-State: AOJu0YwgADRUhclMhLBKTLqB6ssxLvh31NAsiq7M8WFpoOkLEXYhvg64 kUS6lVmaLcWv8luf96/feOv44/T1aYldJXv83m6Hi+fgBTgDru73CAXo5w== X-Gm-Gg: ASbGncsbprv+zW762ASPiTZdQuQVobjLJMMwhvOQSB9YpQRwNg8A9TrTq6kMmo25QOt pOnOfq0VbNA0UMjT7LiY0/aa+u3FznhdUH5qWHoiM8jvS254lGMg850iqFy6OfkwxFLZh/3ZIzP eWLlecY4/O/acSIOEvaX735qZ5iVzvYg1ZZEPQqcqj7AZ9HMgLF2MA3kDz+ElXIUEdWPuBmkeYh RagW/tU2cymVuLfvaDQ1httlm5j1a2iugyxd/tcoyi5XGwQyhjRgz+W96UYkY6KZdicsZt86LSz F5duKTFoLIy0Ixd5QcSzxHAhjxc83biIoCQzvPxa5NcM4g== X-Google-Smtp-Source: AGHT+IH0Q+/7beITQVWQ3apz8zdS1ZKotbgF5H2divOBpI8zaGNsk66Y0pMnpsse3+ccg/CRxhcE9Q== X-Received: by 2002:a05:6000:18a6:b0:391:2db0:2961 with SMTP id ffacd0b85a97d-39c12115cf6mr5182727f8f.38.1743354967754; Sun, 30 Mar 2025 10:16:07 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b66363fsm9323617f8f.36.2025.03.30.10.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 10:16:07 -0700 (PDT) Message-Id: <6206e65ac4d50e174ad7e3dbafaa590b632f214b.1743354964.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sun, 30 Mar 2025 17:16:01 +0000 Subject: [PATCH 2/5] doc: fix synopsis analysis logic Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= The synopsis analysis logic was not able to handle backslashes and stars which are used in the synopsis of the git-rm command. This patch fixes the issue by updating the regular expression used to match the keywords. Signed-off-by: Jean-Noël Avila --- Documentation/asciidoc.conf.in | 8 ++++---- Documentation/asciidoctor-extensions.rb.in | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/asciidoc.conf.in b/Documentation/asciidoc.conf.in index f2aef6cb79f..50f0e81a831 100644 --- a/Documentation/asciidoc.conf.in +++ b/Documentation/asciidoc.conf.in @@ -43,7 +43,7 @@ ifdef::doctype-book[] endif::doctype-book[] [literal-inlinemacro] -{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} +{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\\\*\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} endif::backend-docbook[] @@ -75,18 +75,18 @@ git-relative-html-prefix= {target}{0?({0})} [literal-inlinemacro] -{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} +{eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\\\*\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} endif::backend-xhtml11[] ifdef::backend-docbook[] ifdef::doctype-manpage[] [paradef-default] -synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!\\0!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.]\\+\\|…\\)!\\1\\2!g;s!<[-a-zA-Z0-9.]\\+>!\\0!g'" +synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!\\0!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1\\2!g;s!<[-a-zA-Z0-9.]\\+>!\\0!g'" endif::doctype-manpage[] endif::backend-docbook[] ifdef::backend-xhtml11[] [paradef-default] -synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!\\0!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.]\\+\\|…\\)!\\1\\2!g;s!<[-a-zA-Z0-9.]\\+>!\\0!g'" +synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!\\0!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1\\2!g;s!<[-a-zA-Z0-9.]\\+>!\\0!g'" endif::backend-xhtml11[] diff --git a/Documentation/asciidoctor-extensions.rb.in b/Documentation/asciidoctor-extensions.rb.in index 2494f17a514..09156b71a4f 100644 --- a/Documentation/asciidoctor-extensions.rb.in +++ b/Documentation/asciidoctor-extensions.rb.in @@ -50,7 +50,7 @@ module Git def process parent, reader, attrs outlines = reader.lines.map do |l| l.gsub(/(\.\.\.?)([^\]$.])/, '`\1`\2') - .gsub(%r{([\[\] |()>]|^)([-a-zA-Z0-9:+=~@,/_^\$]+)}, '\1{empty}`\2`{empty}') + .gsub(%r{([\[\] |()>]|^)([-a-zA-Z0-9:+=~@,/_^\$\\\*]+)}, '\1{empty}`\2`{empty}') .gsub(/(<[-a-zA-Z0-9.]+>)/, '__\\1__') .gsub(']', ']{empty}') end @@ -72,7 +72,7 @@ module Git %() elsif type == :monospaced node.text.gsub(/(\.\.\.?)([^\]$.])/, '\1\2') - .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$]+\.{0,2})+)}, '\1\2') + .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*]+\.{0,2})+)}, '\1\2') .gsub(/(<[-a-zA-Z0-9.]+>)/, '\1') else open, close, supports_phrase = QUOTE_TAGS[type] @@ -100,7 +100,7 @@ module Git def convert_inline_quoted node if node.type == :monospaced node.text.gsub(/(\.\.\.?)([^\]$.])/, '\1\2') - .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$]+\.{0,2})+)}, '\1\2') + .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*]+\.{0,2})+)}, '\1\2') .gsub(/(<[-a-zA-Z0-9.]+>)/, '\1') else From patchwork Sun Mar 30 17:16:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 14032976 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25EE01DB34B for ; Sun, 30 Mar 2025 17:16:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354972; cv=none; b=lNmUbYuxDb47BUjQX5TTPkc6yZcjcv/ukuZ7YeM8qgIkVw4t9dBG2H0wDU3t/XrOsHFG3L12R6OVhiELvfR7rVb3pG8P8lUUQdyKw+2O21ViqEkwWk5vGcLTfzNSF3e0k+9hxNstcoLPSLRj+aN2CSnHaDFYmjGjvr6cef6Mrkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354972; c=relaxed/simple; bh=kgd3FnPKqcGOVrBfmitKmUn72IOTMS3iAB0VCZuwJ34=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=DFDsac1gs76W2rn9a0v7CPBNRHNW+/lbWc/syCFhJeHcy3KpuhVR3DeBsbqfL80Z5HQLCRt9C0+3Nr7Pc1utDLXyIwhx8aXNWeturWKQLlG9ooM/h77MraRlVz3z42QTjXhdAD/DKckDIJlUxZlYlZsiH/CV1LiyCYeMu2Jg41A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ez44kjsm; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ez44kjsm" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43948021a45so37534865e9.1 for ; Sun, 30 Mar 2025 10:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743354969; x=1743959769; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=fScNan+Ond41LaX1EqUvHLJhdrFe2S3eahrTPKEZEUs=; b=Ez44kjsmFyWqK840KLtC9OT5+1G1yaqn2RJnwkhfxV+uxwlojacn/DLsn8dflI3773 TnB3qnzeXHk52zfLgIc7Yp7zJBB0d/dIK3pBx6vxg6eb51H/xAFBXEagxmxPjyOtrJ7X CbLwP4Y+BCZyOri0T/OXv7JSwOwyIux92xka5Koe1rlNi8Fe87JaEAQ0sORbKNWDZWNT aGJFfkmkTX3QhzU7tQNUiXfIOxMd2HIGkTmmBY2z0xlcBQLxwqM/ARI6endF8yz6KvXs ecZ0XvcBxdH2CsoiLdLXPAf8CilXZR63coUmKzuCfP/yEM1z9DDEu7sIONRFQmZTJMfX Nh+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743354969; x=1743959769; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fScNan+Ond41LaX1EqUvHLJhdrFe2S3eahrTPKEZEUs=; b=YkgLo8tooeOHN66K8YPDmzBfsVuj3SHTfp+S/KQD8ma28M58YbGGgR60yshTOef+xF 8SUd9ft/yQ1WISFxJ8pvihuVWGSW32Pt7xz1elexN7tSitIf4jYhRI9FgVBROJRM4Rjw qitPcwoEe8Kgh/hoF29PynTo3I7TFPpeKwwjmgxvdwFVOKqGkQsdv2f9WvkIv4aLveL1 bCL9W42GS7ThEg9Ry53ldfpFMzTRQ8y26vL8hwFvE5jrlxjz1Q40tooYEzSKW1l9PGe8 bLrqz47m/TEOB5tHHdGVVcpHSPIg2HZ21SbhKFrn2PDbufQJs4/7VtdXufSILjZov8BK KRdg== X-Gm-Message-State: AOJu0Yxu5Ng9CxzD8cdIkars0e5EJm3THQZ/5WoeNKWqJfoUSWI9NIrd RRwweh54vrlzrcKNAvExj/7wu95CyM1gm/qmTkfE6LF+vKGp3Hx7v7Y8zw== X-Gm-Gg: ASbGncuEgerI75l8SRm0njDx3L+dq6wMKdAs0xbuSzbfdj2xdHhrJlVfkUUeDkBpISE BuZuIkSX9FZ0U5gIe7UwYlEUvvZMOH7sJg6Ltwlrs87RlsTf9oG0H7ElDVyhde2dMriBjGy/pRF t5+L8cN4FMVG5vPrsTGYJqcXEbvs4Em2t/wZlUMSl0Bf0vHjypzqqv6o+yNRTG3dR/6MPlfyRFy kILu2Llqgmebp4Q6IVWY19ac+tMgC5TApTK1sIhRzqOIhV3EZLUTFnjZ+MiOIPNnR9lxVjxkKfW fVJVmmqreHLzMMWECCc9NT6nY7nDmB1EhMwradOKoJaqOw== X-Google-Smtp-Source: AGHT+IEqNVjed+LZrd2h1DohpDqNQJV3P+TGlYyCPequPFcdHGG80n2aScXb99Hkw9BeweHgyrhbvw== X-Received: by 2002:a5d:6daf:0:b0:391:4914:3c6a with SMTP id ffacd0b85a97d-39c120e34b1mr3737975f8f.29.1743354968916; Sun, 30 Mar 2025 10:16:08 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d900013afsm96962215e9.36.2025.03.30.10.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 10:16:08 -0700 (PDT) Message-Id: <41a01969d9394ba4997e729d58c5b566bab315b7.1743354964.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sun, 30 Mar 2025 17:16:02 +0000 Subject: [PATCH 3/5] doc: convert git-rm to new documentation format Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= - Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use __ instead of in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila --- Documentation/git-rm.adoc | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Documentation/git-rm.adoc b/Documentation/git-rm.adoc index 363a26934f5..b5ead867963 100644 --- a/Documentation/git-rm.adoc +++ b/Documentation/git-rm.adoc @@ -7,10 +7,10 @@ git-rm - Remove files from the working tree and from the index SYNOPSIS -------- -[verse] -'git rm' [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] - [--quiet] [--pathspec-from-file= [--pathspec-file-nul]] - [--] [...] +[synopsis] +git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] + [--quiet] [--pathspec-from-file= [--pathspec-file-nul]] + [--] [...] DESCRIPTION ----------- @@ -30,7 +30,7 @@ sparse-checkouts are in use (see linkgit:git-sparse-checkout[1]), OPTIONS ------- -...:: +`...`:: Files to remove. A leading directory name (e.g. `dir` to remove `dir/file1` and `dir/file2`) can be given to remove all files in the directory, and recursively all sub-directories, but this @@ -43,57 +43,57 @@ directories `d` and `d2`, there is a difference between using `git rm 'd*'` and `git rm 'd/*'`, as the former will also remove all of directory `d2`. + -For more details, see the 'pathspec' entry in linkgit:gitglossary[7]. +For more details, see the __ entry in linkgit:gitglossary[7]. --f:: ---force:: +`-f`:: +`--force`:: Override the up-to-date check. --n:: ---dry-run:: +`-n`:: +`--dry-run`:: Don't actually remove any file(s). Instead, just show if they exist in the index and would otherwise be removed by the command. --r:: +`-r`:: Allow recursive removal when a leading directory name is given. -\--:: +`--`:: This option can be used to separate command-line options from the list of files, (useful when filenames might be mistaken for command-line options). ---cached:: +`--cached`:: Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone. ---ignore-unmatch:: +`--ignore-unmatch`:: Exit with a zero status even if no files matched. ---sparse:: +`--sparse`:: Allow updating index entries outside of the sparse-checkout cone. Normally, `git rm` refuses to update index entries whose paths do not fit within the sparse-checkout cone. See linkgit:git-sparse-checkout[1] for more. --q:: ---quiet:: +`-q`:: +`--quiet`:: `git rm` normally outputs one line (in the form of an `rm` command) for each file removed. This option suppresses that output. ---pathspec-from-file=:: - Pathspec is passed in `` instead of commandline args. If - `` is exactly `-` then standard input is used. Pathspec - elements are separated by LF or CR/LF. Pathspec elements can be +`--pathspec-from-file=`:: + Pathspec is passed in __ instead of args. If + __ is exactly `-` then standard input is used. Pathspec + elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]). See also `--pathspec-file-nul` and global `--literal-pathspecs`. ---pathspec-file-nul:: +`--pathspec-file-nul`:: Only meaningful with `--pathspec-from-file`. Pathspec elements are - separated with NUL character and all other characters are taken + separated with _NUL_ character and all other characters are taken literally (including newlines and quotes). @@ -153,15 +153,15 @@ SUBMODULES ---------- Only submodules using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will be removed from the work -tree, as their repository lives inside the .git directory of the +tree, as their repository lives inside the `.git` directory of the superproject. If a submodule (or one of those nested inside it) -still uses a .git directory, `git rm` will move the submodules +still uses a `.git` directory, `git rm` moves the submodules git directory into the superprojects git directory to protect -the submodule's history. If it exists the submodule. section +the submodule's history. If it exists the `submodule.` section in the linkgit:gitmodules[5] file will also be removed and that file -will be staged (unless --cached or -n are used). +will be staged (unless `--cached` or `-n` are used). -A submodule is considered up to date when the HEAD is the same as +A submodule is considered up to date when the `HEAD` is the same as recorded in the index, no tracked files are modified and no untracked files that aren't ignored are present in the submodule's work tree. Ignored files are deemed expendable and won't stop a submodule's work From patchwork Sun Mar 30 17:16:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 14032977 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E5801DC745 for ; Sun, 30 Mar 2025 17:16:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354973; cv=none; b=oBU5xD1YCzw3la8EE4zUX8xtpR+RpC/dZqneF8xzPakE/tgqbdC+M9ioH1dONmvAW+Ppx4YG032NBHFrz7OVV9+vCVNj7XS9CbzhEDVuzOYUYsteb30Owttyt6dWVLEKbOS8A2JKh86XE8gyWWZEWTV4LshROWQTVaOHJ4+CW9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354973; c=relaxed/simple; bh=M9XsA+OSmsH4RsuXbNaJhjb92BbkVZfM2vzE7llGugg=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=I/+MZm3WpRji8dtRVPSv6ndEWOGi7jztVgaV4n0JmiitlSDH6EIugBzAx+covzmxCtuvqzgUzvh8ypopv/a9Xilva9ymmSuo73vG/J0aIcD57yftAfU9jeA6rCTClNWTmaPwWcAtiYZvhpShcAeE3WEWQKe9Jdf/fpZs9iu9JL4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Av3AnCRI; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Av3AnCRI" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43bb6b0b898so32924675e9.1 for ; Sun, 30 Mar 2025 10:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743354970; x=1743959770; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=9Sy4Ddd+FQkwANT/sTwpIZiUSSES38kAezkndsJMIcI=; b=Av3AnCRI4kh1kf5GSer7vU6XOQ9MdNcBAVF3NAt4jPSr4muB9jjrJaoJ8w4UepDBL0 aQeU21c3Tg5TQBEdtRTvs40FkGPbNQXW+vEgXDzjCQP1lL/MRvuQtdu6vwtXdlGNONWP 8wKDTc3vKQ1anWGeteYKJYCJIp+0zcbpPxCwtjBw6gVD1wbVHoyxgDbNtMd7Mfw1fmDx LEcvGrMjKDzTufysyRUe4sc7qHZxtrfvNkhut9DIgyPuVifmXxCwbf6+l0Z1onnnhG7B xG2JSsV6wkDGdp1Gmv7lWyuWY5vU+xkiMhUA9AsGwMNSM2OFZDf0HZBxtXdOtG5m09ni tegg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743354970; x=1743959770; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Sy4Ddd+FQkwANT/sTwpIZiUSSES38kAezkndsJMIcI=; b=lf7CO84Xxj88MQtUy6YY/XfH17I+y23yVtQJmWqkR20DmBbcQhNFdjuugU6/ebPB3Y KMGw07VSGQxnVPDIMb73wsF3mrw9m2BkoN/I30SuIED8mE8JRH7MlIbzX/a3zbj7wDQ0 Gj09fTXiYNfwqLuyGWgILKz7PpoyVotPYVUSZv9cojUYS6X3eIT3EQsWnAcoow56W8wz +FFgq6czoRl7YC/0OuxdreOlW9QZtfYjoVxJE1f205CAzTqJ3yKWcBm9E/X3CWCNX1fF rgz9GbJZck+IemdTm9N4M/ktaxyEnhxHKp3BO3n+ANhqHZFF9zcpnmN0qUbyGAPgVsVQ UTXA== X-Gm-Message-State: AOJu0Yzk3h7IDxn7sEn8FyZ0phmDYkj+zqPLQV6kSTKQGIa7ripqo3C3 UK3Gqo0niRBDz4FCIoGClhnFkDWGiQ5PwqKgyECPdw4MDMUMDFpNdDQcrw== X-Gm-Gg: ASbGncuDdCwsLmkRAI7S1sxf1+GcQLtRbdH6Mi6nmQd6tj3ffsAHBUTPMx0uvC87wUI g7mOtCJzMoJRgiwAgtLmKfvCIhv7DDCBrvvrH5L60/AmGAXFKUv7b/olu5mp2UZq/v9gNhXUZOO ZqRf2JMgpfC65B4Z/acGZ9ZZKjwA918/QTOUaKdi3KVzNIOEvbl9xKBLROjt8It1Xj6UIkV1mYA 7xUtMtVG+hxBTZoBY/2bXdrlifSsK9GKq5roPsWfb15OZD7SzD/wb2GSOI2vSwAviB7n1SdTc/w YED8B8RlhchgTObRGQ7TxnEiDeKsMLopTD9AQSqI77z3SzyIcWg/1KId X-Google-Smtp-Source: AGHT+IF7ILqzs536gQ5VaMxNqwsX9f/PwVNjDrgViMdsEpVTIkzWgWDGkmlAAxRCkmLptpI6bgzX0w== X-Received: by 2002:a05:600c:1e16:b0:43d:40b0:5b with SMTP id 5b1f17b1804b1-43dbc6f9cafmr53125255e9.25.1743354970002; Sun, 30 Mar 2025 10:16:10 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d90001413sm97160165e9.39.2025.03.30.10.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 10:16:09 -0700 (PDT) Message-Id: <9f7cd02cc1ef76bfe92cbb8152f34460c67b2eda.1743354964.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sun, 30 Mar 2025 17:16:03 +0000 Subject: [PATCH 4/5] doc: move synopsis git-mv commands in the synopsis section Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= This also entails changing the help output for the command to match the new synopsis. Signed-off-by: Jean-Noël Avila --- Documentation/git-mv.adoc | 6 ++---- builtin/mv.c | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/git-mv.adoc b/Documentation/git-mv.adoc index dc1bf615341..08d660643fc 100644 --- a/Documentation/git-mv.adoc +++ b/Documentation/git-mv.adoc @@ -9,15 +9,13 @@ git-mv - Move or rename a file, a directory, or a symlink SYNOPSIS -------- [verse] -'git mv' [] ... +'git mv' [-v] [-f] [-n] [-k] +'git mv' [-v] [-f] [-n] [-k] ... DESCRIPTION ----------- Move or rename a file, directory, or symlink. - git mv [-v] [-f] [-n] [-k] - git mv [-v] [-f] [-n] [-k] ... - In the first form, it renames , which must exist and be either a file, symlink or directory, to . In the second form, the last argument has to be an existing diff --git a/builtin/mv.c b/builtin/mv.c index 55a7d471dca..9e36b616ab6 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -28,7 +28,8 @@ #include "entry.h" static const char * const builtin_mv_usage[] = { - N_("git mv [] ... "), + N_("git mv [-v] [-f] [-n] [-k] "), + N_("git mv [-v] [-f] [-n] [-k] ... "), NULL }; From patchwork Sun Mar 30 17:16:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 14032978 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DB1F1DDA39 for ; Sun, 30 Mar 2025 17:16:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354975; cv=none; b=fi7uRRbbZ3O9eM8Jh7/uxE26mvdWOwsZOAlteZaibv3V5ayRemAF8XSkgUT0bIBT0dU9WYaOco5ghqhQm7+h2JEmJjH6QdbeipkKnrjB5LyRy+H2QncfkR0Sz2YqCQMoHBoPlC5AWRFUNSVDUnfwqkcJQHvyPBu+U+ESoUoeOhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743354975; c=relaxed/simple; bh=ysUXQGXfTyMqHYuY4RfXI3m6WmhTzNwRryI0InO75xU=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=oRRkALZHZap9HZG5sTNFjIvJhqydhy7E/F61wgqtbxVXHjaCzjZdvKW9/MJHkORJIMnNg9crp9Ps9HqnNJ7di+zfLoNfuNBEaJ1UVt/deTELtvpaFOWFQGGLyKCPibtTgQmv6Ho6/XbEt4sEkiMS59EpiTFuTj1c1Cy7MmW1SMc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=in+jNEzO; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="in+jNEzO" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-43cf628cb14so32127975e9.1 for ; Sun, 30 Mar 2025 10:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743354971; x=1743959771; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=/uEUT7X67/bvWrb+IAuMscOPwyJnDpSsSA/Dvhszkus=; b=in+jNEzOBGBx0hlbzr0i6TOfqyNvrNGKXFQ1nk448hMYzYH/raDZ6j7gl3UVGgxkqX cqFjRZ19qG24DsCqkxkQg0D0viAOxPir6CT/XCqtpAgkdyNvJU2hG0+JITFsJ7HJmnTk TLNwi7ti1wYvwRxcGN5oRmBihLfmOghLj53lLjidigG7IUgNJDuGg4gG+jFSV+J0qjrF 9wPj7/wdZEIQE9xTvceWTcGQ/fJBWEO3XXAjkMeTsZjDopaVLic/j2oj1Muf5aIIsO+W /6Z5HsGipD34n385nt0UzjDy0wlYgO2UlcENDqGlumGCONN9fQhFaw2nknOrJ30jTosC fndg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743354971; x=1743959771; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/uEUT7X67/bvWrb+IAuMscOPwyJnDpSsSA/Dvhszkus=; b=IOtOJcLjJcTM47WrBTyMN0fNxJt1rx06oEZrBRFIUGbjdM8/duNwO1dBMUqLEiZew2 F72gBnOXYRIso5E6tFLN0WTBqExOiHwjdlEEi9PrvDvycZnVxjuWXQyqx804ceS/Newn +u3wg+kBhbq5oyVEsf5tsB8NsM/K4lCREEv1bhO+zFRs2T20hIsPmV+ogss1G9de4u11 w20rzNHvJ3fgTGhvXHS3PpvoicCKYtzViGL1g2K1g58fTJBkItSb8qpaskkpVvkxIySL 4Ofb968aO/HJEbC9GNuO/mEttUO+JZWqpbM++844VuhXosvx+vU95dNSTl7JfFl9sm3F gdoQ== X-Gm-Message-State: AOJu0YzA3OFeyZsaiWz6bousmj9dO0CCdLa0atl2B/4NK2+X37rEheu9 yFfvBjeHcgOOsb2ClWLhPWMXiGdIKheHrFk9L10XPlP7Ut99q33mOp477g== X-Gm-Gg: ASbGncsiDDIdrcDREmMiy7FRY6enneCZozn9oAVzxV8Krpvln7DfODbfqt71JaWzrjt H3841MNx4HQnZ0VzMZRhLdlYgqmX1Wnins4Wotm0ygalhNZaFihTONwVHIEYNt4I8q0g2qUeMRh HSP7sW48IWwuiNrc4+48RVizczOU0ookRV9Nmq/VdFIX+cCx6L78K4ZLXs5qYHjL2GPUHI+dLds GlpSJMj+XKsr2SkHWbGNDLfLG4hXPjA78XK+9ksCt+3H3YedumEnVkBQmUVJzKB3cFxX4eTaJ2N BsfYMmT5F8Yz5eVLQjCx209CtvaxIhPRT8YGz16Rg82szg== X-Google-Smtp-Source: AGHT+IFDnK1NnjN7Iny9eXByedYGyL2ksEJ0lDXZtYn45wZa68bBpGmSG8LxR1Jt5ksKB+qzE1JaTg== X-Received: by 2002:a05:600c:a086:b0:43d:186d:a4bf with SMTP id 5b1f17b1804b1-43dabe2384dmr43987055e9.0.1743354971099; Sun, 30 Mar 2025 10:16:11 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d82e6adf6sm138438045e9.15.2025.03.30.10.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 10:16:10 -0700 (PDT) Message-Id: <4887567c57cd54b8f5989d1d05a9a7a9663665b1.1743354964.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Sun, 30 Mar 2025 17:16:04 +0000 Subject: [PATCH 5/5] doc: convert git-mv to new documentation format Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: =?utf-8?q?Jean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No?= =?utf-8?q?=C3=ABl_Avila?= From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= - Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use __ instead of in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Unfortunately, there's an inconsistency in the synopsis style, where the ellipsis is used to indicate that the option can be repeated, but it can also be used in Git's three-dot notation to indicate a range of commits. The rendering engine will not be able to distinguish between these two cases. Signed-off-by: Jean-Noël Avila --- Documentation/git-mv.adoc | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Documentation/git-mv.adoc b/Documentation/git-mv.adoc index 08d660643fc..a0b8118cf4f 100644 --- a/Documentation/git-mv.adoc +++ b/Documentation/git-mv.adoc @@ -8,17 +8,18 @@ git-mv - Move or rename a file, a directory, or a symlink SYNOPSIS -------- -[verse] -'git mv' [-v] [-f] [-n] [-k] -'git mv' [-v] [-f] [-n] [-k] ... + +[synopsis] +git mv [-v] [-f] [-n] [-k] +git mv [-v] [-f] [-n] [-k] ... DESCRIPTION ----------- Move or rename a file, directory, or symlink. -In the first form, it renames , which must exist and be either -a file, symlink or directory, to . -In the second form, the last argument has to be an existing +In the first form, it renames __, which must exist and be either +a file, symlink or directory, to __. +In the second form, __ has to be an existing directory; the given sources will be moved into this directory. The index is updated after successful completion, but the change must still be @@ -26,20 +27,20 @@ committed. OPTIONS ------- --f:: ---force:: +`-f`:: +`--force`:: Force renaming or moving of a file even if the exists. --k:: +`-k`:: Skip move or rename actions which would lead to an error condition. An error happens when a source is neither existing nor controlled by Git, or when it would overwrite an existing file unless `-f` is given. --n:: ---dry-run:: +`-n`:: +`--dry-run`:: Do nothing; only show what would happen --v:: ---verbose:: +`-v`:: +`--verbose`:: Report the names of files as they are moved. SUBMODULES @@ -47,8 +48,8 @@ SUBMODULES Moving a submodule using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will update the gitfile and core.worktree setting to make the submodule work in the new location. -It also will attempt to update the submodule..path setting in -the linkgit:gitmodules[5] file and stage that file (unless -n is used). +It also will attempt to update the `submodule..path` setting in +the linkgit:gitmodules[5] file and stage that file (unless `-n` is used). BUGS ----