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

double occurrence of filenames on command lines

From
MKmartin f krafft <madduck@madduck.net>
Date
Aug 29, 2007, 08:11 UTC
Message-ID
<20070829081122.GA604@piper.oerlikon.madduck.net>
Dear list,
While I can say something like
  git add foo bar foo
  (note the doubled foo)
when using git-add from a script, the following fails:
  $ git commit -m. foo foo
  error: pathspec 'foo' did not match any file(s) known to git.
  Did you forget to 'git add'?

I am bringing this up in the context of http://bugs.debian.org/439992, where debcommit.pl would duplicate a file argument under certain conditions. It's since been fixed, but I wonder whether git-commit could be made more robust in the presence of duplicate arguments? Or is this behaviour by choice?

PS: please keep 439992-quiet@bugs.debian.org on Cc.
-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
an egg has the shortest sex-life of all: if gets laid once; it gets
eaten once. it also has to come in a box with 11 others, and the
only person who will sit on its face is its mother.
 
spamtraps: madduck.bogus@madduck.net
Next: Alex Riesen
Message 1 of 9 in “double occurrence of filenames on command lines”
  1. martin f krafftAug 29, 2007
  2. Remove duplicate pathspecs from ls-files command lineAlex Riesen, Aug 29, 2007
  3. Junio C HamanoAug 29, 2007
  4. martin f krafftAug 29, 2007
  5. Alex RiesenAug 29, 2007
  6. David KastrupAug 29, 2007
  7. Junio C HamanoAug 30, 2007
  8. David KastrupAug 30, 2007
  9. martin f krafftAug 29, 2007

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.