{"thread":{"id":"60618","subject":"Bug | Documentation | git add -all | Synopsis has minor mistake","startedAt":"2023-12-15T12:38:32Z","lastAt":"2023-12-15T21:04:27Z","messageCount":5,"participants":["Benjamin Lehmann","Eric Sunshine","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485716","messageId":"CAM=w4Pn46nTcWA1e=n4Rms76gCx7iqbRmOWf3=vRmKgtbhqQmA@mail.gmail.com","threadId":"60618","inReplyTo":null,"subject":"Bug | Documentation | git add -all | Synopsis has minor mistake","fromName":"Benjamin Lehmann","fromEmail":"ben.lehmann@gmail.com","sentAt":"2023-12-15T12:38:20Z","receivedAt":"2023-12-15T12:38:32Z","isPatch":false,"sender":{"key":"ben.lehmann@gmail.com","avatar":null},"body":"Hey.\n\nThe mistake can be found in the synopsis here:\nhttps://git-scm.com/docs/git-add#Documentation/git-add.txt--A\n\nIn the synopsys, the options -all currently reads:\n\n[--[no-]all | --[no-]ignore-removal |\n\nYou can see that there is no mention of -A, which is the main way that\npeople would use -all perhaps, so it really ought to be included\ncorrectly in the synopsis. In addition, the closing square-bracket is\nmissing.\n\nHope this was the right place to report this - seemed to be the only option.\n\nBen\n"},{"id":"485729","messageId":"20231215204333.1253-1-ericsunshine@charter.net","threadId":"60618","inReplyTo":"CAM=w4Pn46nTcWA1e=n4Rms76gCx7iqbRmOWf3=vRmKgtbhqQmA@mail.gmail.com","subject":"[PATCH] git-add.txt: add missing short option -A to synopsis","fromName":"Eric Sunshine","fromEmail":"ericsunshine@charter.net","sentAt":"2023-12-15T20:43:33Z","receivedAt":"2023-12-15T20:46:06Z","isPatch":true,"sender":{"key":"ericsunshine@charter.net","avatar":null},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\n\nWith one exception, the synopsis for `git add` consistently lists the\nshort counterpart alongside the long-form of each option (for instance,\n\"[--edit | -e]\"). The exception is that -A is not mentioned alongside\n--all. Fix this inconsistency\n\nReported-by: Benjamin Lehmann <ben.lehmann@gmail.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n\nAn alternative would be to collapse the synopsis to:\n\n    'git add' <options> [--] [<pathspec>...]\n\nas has been done for other command documentation, however doing so would\nthrow away at-a-glance clues about which options are mutually exclusive,\nso adding the missing -A to the synopsis seems preferable (for now, at\nleast).\n\n Documentation/git-add.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\nindex ed44c1cb31..3d2e670716 100644\n--- a/Documentation/git-add.txt\n+++ b/Documentation/git-add.txt\n@@ -9,7 +9,7 @@ SYNOPSIS\n --------\n [verse]\n 'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]\n-\t  [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]] [--sparse]\n+\t  [--edit | -e] [--[no-]all | -A | --[no-]ignore-removal | [--update | -u]] [--sparse]\n \t  [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize]\n \t  [--chmod=(+|-)x] [--pathspec-from-file=<file> [--pathspec-file-nul]]\n \t  [--] [<pathspec>...]\n-- \n2.43.0\n\n"},{"id":"485730","messageId":"CAPig+cSkzJpufEG_XhFdSho89itLOuvCwMaTkXXAjryNnWteQQ@mail.gmail.com","threadId":"60618","inReplyTo":"CAM=w4Pn46nTcWA1e=n4Rms76gCx7iqbRmOWf3=vRmKgtbhqQmA@mail.gmail.com","subject":"Re: Bug | Documentation | git add -all | Synopsis has minor mistake","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-12-15T20:49:02Z","receivedAt":"2023-12-15T20:49:14Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Dec 15, 2023 at 7:38 AM Benjamin Lehmann <ben.lehmann@gmail.com> wrote:\n> The mistake can be found in the synopsis here:\n> https://git-scm.com/docs/git-add#Documentation/git-add.txt--A\n>\n> In the synopsys, the options -all currently reads:\n>\n> [--[no-]all | --[no-]ignore-removal |\n>\n> You can see that there is no mention of -A, which is the main way that\n> people would use -all perhaps, so it really ought to be included\n> correctly in the synopsis.\n\nThis seems to be a simple oversight when the --all option was added by\nda98053aa6 (git-add --all: documentation, 2008-07-19).\n\n> In addition, the closing square-bracket is missing.\n\nI think this is inaccurate. If you look closely, you will find the\nclosing bracket after the -u option:\n\n    [--[no-]all | --[no-]ignore-removal | [--update | -u]]\n\nmeaning that --all, --ignore-removal, and --update are mutually exclusive.\n\n> Hope this was the right place to report this - seemed to be the only option.\n\nThis is the correct place. I posted a patch[1] addressing the issue.\n\n[1]: https://lore.kernel.org/git/20231215204333.1253-1-ericsunshine@charter.net/\n"},{"id":"485731","messageId":"xmqqjzpfkwnr.fsf@gitster.g","threadId":"60618","inReplyTo":"20231215204333.1253-1-ericsunshine@charter.net","subject":"Re: [PATCH] git-add.txt: add missing short option -A to synopsis","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-12-15T21:01:28Z","receivedAt":"2023-12-15T21:01:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <ericsunshine@charter.net> writes:\n\n> From: Eric Sunshine <sunshine@sunshineco.com>\n>\n> With one exception, the synopsis for `git add` consistently lists the\n> short counterpart alongside the long-form of each option (for instance,\n> \"[--edit | -e]\"). The exception is that -A is not mentioned alongside\n> --all. Fix this inconsistency\n>\n> Reported-by: Benjamin Lehmann <ben.lehmann@gmail.com>\n> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n> ---\n\nThanks.\n\nI dug the history just in case we deliberately wanted to leave this\nout of the synopsis section, but the side branch leading to the\nmerge at 378335b3 (Merge branch 'jc/add-addremove', 2008-07-20) does\nnot say we wanted to discourage \"-A\" (and encourage \"--all\").  This\nwould be a welcome change.\n\nWill queue.\n"},{"id":"485732","messageId":"CAPig+cS3Yb2n4e7ZxmSFFxYbHWn7wcMBXG=nCigCKst-GzGLLQ@mail.gmail.com","threadId":"60618","inReplyTo":"xmqqjzpfkwnr.fsf@gitster.g","subject":"Re: [PATCH] git-add.txt: add missing short option -A to synopsis","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-12-15T21:04:15Z","receivedAt":"2023-12-15T21:04:27Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Dec 15, 2023 at 4:01 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <ericsunshine@charter.net> writes:\n> > With one exception, the synopsis for `git add` consistently lists the\n> > short counterpart alongside the long-form of each option (for instance,\n> > \"[--edit | -e]\"). The exception is that -A is not mentioned alongside\n> > --all. Fix this inconsistency\n>\n> I dug the history just in case we deliberately wanted to leave this\n> out of the synopsis section, but the side branch leading to the\n> merge at 378335b3 (Merge branch 'jc/add-addremove', 2008-07-20) does\n> not say we wanted to discourage \"-A\" (and encourage \"--all\").  This\n> would be a welcome change.\n\nI also dug through the history for the same reason and, like you, did\nnot find any indication that -A was omitted from the synopsis\ndeliberately. I probably should have stated as much in the patch\ncommentary.\n"}]}