git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Git add <device file> silently fails
@ 2010-04-17 14:24 Andreas Gruenbacher
  2010-04-17 14:44 ` Alex Riesen
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Gruenbacher @ 2010-04-17 14:24 UTC (permalink / raw)
  To: git

Hello,

there is code in read-cache.c:add_to_index() which checks if a file to be 
added is a regular file, directory, or symlink; this function otherwise 
error()s out.  It looks as if add_to_index() is supposed to be called via:

  builtin/add.c:update_callback() ->
    read-cache.c:add_file_to_index() ->
      read-cache.c:add_to_index()

However, when trying to add a device special file, update_callback() ends up 
never getting called, no error message is produced, and git add silently 
fails:

	$ sudo mknod foobar c 1 3
	$ git add foobar
   $ echo $?
	0

Maybe someone familiar with run_diff_files() can have a look?

Thanks,
Andreas

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

end of thread, other threads:[~2010-04-19  5:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-17 14:24 [BUG] Git add <device file> silently fails Andreas Gruenbacher
2010-04-17 14:44 ` Alex Riesen
2010-04-17 15:00   ` Andreas Gruenbacher
2010-04-17 15:27     ` Alex Riesen
2010-04-17 16:38   ` Junio C Hamano
2010-04-17 17:32     ` Alex Riesen
2010-04-17 18:23       ` Alex Riesen
2010-04-17 17:57     ` Andreas Gruenbacher
2010-04-19  5:15       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).