[BUG] Git add <device file> silently fails

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Gruenbacher
Date: Saturday, April 17, 2010 - 7:24 am

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] Git add <device file> silently fails, Andreas Gruenbacher, (Sat Apr 17, 7:24 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Alex Riesen, (Sat Apr 17, 7:44 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Andreas Gruenbacher, (Sat Apr 17, 8:00 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Alex Riesen, (Sat Apr 17, 8:27 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Junio C Hamano, (Sat Apr 17, 9:38 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Alex Riesen, (Sat Apr 17, 10:32 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Andreas Gruenbacher, (Sat Apr 17, 10:57 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Alex Riesen, (Sat Apr 17, 11:23 am)
Re: [BUG] Git add &lt;device file&gt; silently fails, Junio C Hamano, (Sun Apr 18, 10:15 pm)