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

Re: Incomplete bash completion on git commit: --allow-empty-message and --allow-empty

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 16, 2018, 15:10 UTC
Message-ID
<CACsJy8At828KS_U+CzhujtJXn9Ma+p4fbmTm-72XsS28Hj62oQ@mail.gmail.com>
In-Reply-To
<69624916-f6ba-d4a4-e346-69498662905e@hadisafari.ir>
On Thu, Aug 16, 2018 at 3:50 PM Hadi Safari <hadi@hadisafari.ir> wrote:
Show 5 quoted lines
>
> Hi!
>
> I'm wondering why there isn't --allow-empty and --allow-empty-message in
> completeion list of git commit command.

This is because they are marked "hidden" in the code. If you do "git commit -h", they will not show up either. Ævar provided the reason for hiding them in c9b5fde759 (Add option to git-commit to allow empty log messages - 2010-04-06), basically "not for normal use" so it makes sense to not complete them. If they are used often on command line now, then of course we need to reconsider to stop hiding them.

-- 
Duy
Previous: Hadi SafariNext: Ævar Arnfjörð Bjarmason
Message 2 of 5 in “Incomplete bash completion on git commit: --allow-empty-message and --allow-empty”
  1. Hadi SafariAug 16, 2018
  2. Duy NguyenAug 16, 2018
  3. completion: include PARSE_OPT_HIDDEN in completion outputÆvar Arnfjörð Bjarmason, Aug 16, 2018
  4. Junio C HamanoAug 16, 2018
  5. Duy NguyenAug 17, 2018

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.