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

[PATCH v4] Remove --allow-empty from the git-commit synopsis

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 7, 2010, 19:28 UTC
Message-ID
<1270668498-30495-1-git-send-email-avarab@gmail.com>
In-Reply-To
<7vfx37cckf.fsf@alter.siamese.dyndns.org>

The --allow-empty option is too rarely used to warrant being displayed in the SYNOPSIS. It should only be mentioned in the main body of the documentation like --porcelain.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
> If you mention what Peff said, it would be nice to Cc: him.
Corrected.
> Please don't cite marc

Sorry, I'm new here and there was no mention of this in Documentation/SubmittingPatches. I looked through `git log' for the project and found 10 such links in other commit messages.

Now that I look closer there are 14 references to some `Message-ID:', but of course someone getting it wrong in the past doesn't mean that it's a good idea to follow their example. I won't cite marc.info again.

> I do not think Jeff was against having a complete listing in the
> documentation.  Wasn't his suggestion about "git commit -h" output

Yes I misread (or rather, mis-recalled) the content of his message. He was indeed talking about `git commit -h' output, but I subsequently updated my --allow-empty-message patch to omit it from the SYNOPSIS for git-commit(1). I've removed the links to `marc.info' (or any Message-ID's) since they aren't pertinent anymore.

The relatively obscure --allow-empty* options should regardless of that misunderstanding probably be omitted from the SYNOPSIS section. It would reduce the cognitive load of the casual manual reader who's trying to get an idea of the most common usage for the command.

As for Jeff's suggestion of omitting options from the `--help' output: I couldn't find a way to do that using parse-options.[ch]. It's also customary for `--help' to include the full usage examples regardless of how long they get (just look at wget, ls etc.). The SYNOPSIS sections in manual pages by comparison usually aim for brevity.

 Documentation/git-commit.txt |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 64fb458..ed2cd95 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -10,9 +10,8 @@ SYNOPSIS
 [verse]
 'git commit' [-a | --interactive] [-s] [-v] [-u<mode>] [--amend] [--dry-run]
 	   [(-c | -C) <commit>] [-F <file> | -m <msg>] [--reset-author]
-	   [--allow-empty] [--no-verify] [-e] [--author=<author>]
-	   [--date=<date>] [--cleanup=<mode>] [--status | --no-status] [--]
-	   [[-i | -o ]<file>...]
+	   [--no-verify] [-e] [--author=<author>] [--date=<date>]
+	   [--cleanup=<mode>] [--status | --no-status] [--] [[-i | -o ]<file>...]
 
 DESCRIPTION
 -----------
-- 
1.7.0.4.298.gc81d
Previous: Junio C HamanoNext: Stephen Boyd
Message 30 of 35 in “Does Git really need a commit message to go with a commit?”
  1. Ævar Arnfjörð BjarmasonApr 3, 2010
  2. Avery PennarunApr 4, 2010
  3. Add option to git-commit to allow empty log messagesÆvar Arnfjörð Bjarmason, Apr 4, 2010
  4. David AguilarApr 4, 2010
  5. Ævar Arnfjörð BjarmasonApr 4, 2010
  6. Junio C HamanoApr 5, 2010
  7. Sverre RabbelierApr 5, 2010
  8. Junio C HamanoApr 5, 2010
  9. Sverre RabbelierApr 5, 2010
  10. Miles BaderApr 5, 2010
  11. Junio C HamanoApr 5, 2010
  12. Jeff KingApr 5, 2010
  13. Ævar Arnfjörð BjarmasonApr 5, 2010
  14. Jonathan NiederApr 5, 2010
  15. Jonathan NiederApr 5, 2010
  16. Jeff KingApr 6, 2010
  17. Add option to git-commit to allow empty log messagesÆvar Arnfjörð Bjarmason, Apr 6, 2010
  18. Junio C HamanoApr 7, 2010
  19. Ævar Arnfjörð BjarmasonApr 7, 2010
  20. Ævar Arnfjörð BjarmasonApr 6, 2010
  21. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  22. Sverre RabbelierApr 7, 2010
  23. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  24. Sverre RabbelierApr 7, 2010
  25. Ævar Arnfjörð BjarmasonApr 7, 2010
  26. Tay Ray ChuanApr 7, 2010
  27. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  28. Johannes SixtApr 7, 2010
  29. Junio C HamanoApr 7, 2010
  30. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  31. Stephen BoydApr 7, 2010
  32. Junio C HamanoApr 7, 2010
  33. Jeff KingApr 8, 2010
  34. Jeff KingApr 6, 2010
  35. Santi BéjarApr 4, 2010

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.