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

Re: mismatch between doc and program in git commit -u (--untracked-files)

From
Jeff King <peff@peff.net>
Date
May 8, 2008, 16:13 UTC
Message-ID
<20080508161342.GB28701@sigill.intra.peff.net>
In-Reply-To
<2e24e5b90805080310p2cb77814i45a418a0cfc8a2c@mail.gmail.com>
On Thu, May 08, 2008 at 03:40:14PM +0530, Sitaram Chamarty wrote:
Show 5 quoted lines
> The doc for commit says "-u" is a suitable abbreviation for
> --untracked-files, but only the latter works.
> 
> I'll submit a patch, but being new, I thought I'd ask which is correct
> -- the doc or the code?
Looks like it got lost in the C rewrite of git-commit:
  $ git grep untracked-files builtin-commit.c
  builtin-commit.c:       OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),
  $ git grep -B2 contrib/examples/git-commit.sh
  contrib/examples/git-commit.sh- -u|--u|--un|--unt|--untr|--untra|--untrac|--untrack|--untracke|\
  contrib/examples/git-commit.sh- --untracked|--untracked-|--untracked-f|--untracked-fi|--untracked-fil|\
  contrib/examples/git-commit.sh: --untracked-file|--untracked-files)

So it should probably be supported. The patch is a one-liner, but I'll leave it as an exercise for you. :)

-Peff
Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 2 of 3 in “mismatch between doc and program in git commit -u (--untracked-files)”
  1. Sitaram ChamartyMay 8, 2008
  2. Jeff KingMay 8, 2008
  3. Sitaram ChamartyMay 9, 2008

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.