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

git-checkout-index, flag ordering and --prefix kludgy handling

From
BBlaisorblade <blaisorblade@yahoo.it>
Date
Oct 16, 2005, 19:14 UTC
Message-ID
<200510162114.27429.blaisorblade@yahoo.it>
I already knew that git-checkout-cache -a -f is wrong. But I didn't know that 
git-checkout-index -a --prefix=/home/paolo/Uml/space.mnt/paolo/Linux-2.6.git/

is. It checks out the files in the cwd, then parses --prefix and does nothing there, as no name is specified.

Also, the SYNOPSIS of the man page is rather misleading:
git-checkout-index [-u] [-q] [-a] [-f] [-n] [--prefix=<string>] [--] <file>...
seems to suggest that prefix can go after -f, how it's reasonable to do.

At least, this should be documented in the man page; but I think that fixing this (via two getopt() invocations rather than one, the first for flags like --prefix and the rest for actions) is probably a better thing to do.

Actually, given the audience, saying that "-a" and "filename" are both actions (which are executed when seen on the command line) would be a better explaination - and a reference to the "find" command (which behaves similarly) would be worth.

However, find *does* accept "options" (like -maxdepth) in any cmd line place.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade


		
___________________________________ 
Yahoo! Messenger: chiamate gratuite in tutto il mondo 
http://it.messenger.yahoo.com
Next: Junio C Hamano
Message 1 of 10 in “git-checkout-index, flag ordering and --prefix kludgy handling”
  1. BlaisorbladeOct 16, 2005
  2. Junio C HamanoOct 17, 2005
  3. Linus TorvaldsOct 17, 2005
  4. Junio C HamanoOct 18, 2005
  5. Linus TorvaldsOct 18, 2005
  6. Junio C HamanoOct 18, 2005
  7. Linus TorvaldsOct 18, 2005
  8. Teach "git diff" to handle filenames startign with '-'Linus Torvalds, Oct 18, 2005
  9. Handle "-" at beginning of filenames, part 3Linus Torvalds, Oct 18, 2005
  10. git-checkout: revert specific paths to either index or a given tree-ish.Junio C Hamano, Oct 18, 2005

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.