git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-add.txt: add missing short option -A to synopsis

From
ESEric Sunshine <ericsunshine@charter.net>
Date
Dec 15, 2023, 20:43 UTC
Message-ID
<20231215204333.1253-1-ericsunshine@charter.net>
In-Reply-To
<CAM=w4Pn46nTcWA1e=n4Rms76gCx7iqbRmOWf3=vRmKgtbhqQmA@mail.gmail.com>
From: Eric Sunshine <sunshine@sunshineco.com>

With one exception, the synopsis for `git add` consistently lists the short counterpart alongside the long-form of each option (for instance, "[--edit | -e]"). The exception is that -A is not mentioned alongside --all. Fix this inconsistency

Reported-by: Benjamin Lehmann <ben.lehmann@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
An alternative would be to collapse the synopsis to:
    'git add' <options> [--] [<pathspec>...]

as has been done for other command documentation, however doing so would throw away at-a-glance clues about which options are mutually exclusive, so adding the missing -A to the synopsis seems preferable (for now, at least).

 Documentation/git-add.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index ed44c1cb31..3d2e670716 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
-	  [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]] [--sparse]
+	  [--edit | -e] [--[no-]all | -A | --[no-]ignore-removal | [--update | -u]] [--sparse]
 	  [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize]
 	  [--chmod=(+|-)x] [--pathspec-from-file=<file> [--pathspec-file-nul]]
 	  [--] [<pathspec>...]
-- 
2.43.0
Previous: Benjamin LehmannNext: Junio C Hamano
Message 2 of 5 in “Bug | Documentation | git add -all | Synopsis has minor mistake”
  1. Benjamin LehmannDec 15, 2023
  2. git-add.txt: add missing short option -A to synopsisEric Sunshine, Dec 15, 2023
  3. Junio C HamanoDec 15, 2023
  4. Eric SunshineDec 15, 2023
  5. Eric SunshineDec 15, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.