public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* Is Git Add Supposed to Work Like This (git 2.50)?
@ 2025-09-07  2:02 Jon Forrest
  2025-09-07  8:10 ` Re " K Jayatheerth
  2025-09-07 23:34 ` Jeff King
  0 siblings, 2 replies; 9+ messages in thread
From: Jon Forrest @ 2025-09-07  2:02 UTC (permalink / raw)
  To: git

(Linux fedora 6.16.4-200.fc42.x86_64)

Let's say I have the file "x" in my working directory, but
not "bogus_file".

If I run

	git add x bogus_file

I get

	fatal: pathspec 'bogus_file' did not match any files

This is what I expect. However, if I look at what's in the index,
"x" doesn't appear. The same thing happens if I specify 15
valid files followed by 1 invalid file.

Apparently the presence of even 1 invalid file invalidates
the whole 'git add' command, no matter how many valid files
are included.

Is this deliberate?

Cordially,
Jon Forrest


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-09-09 21:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-07  2:02 Is Git Add Supposed to Work Like This (git 2.50)? Jon Forrest
2025-09-07  8:10 ` Re " K Jayatheerth
2025-09-07 23:34 ` Jeff King
2025-09-09 16:00   ` Jon Forrest
2025-09-09 18:33     ` Jon Forrest
2025-09-09 18:42       ` Jeff King
2025-09-09 20:55         ` Junio C Hamano
2025-09-09 21:01           ` Jeff King
2025-09-09 18:40     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox