From: Andreas Gruenbacher <agruen@suse.de>
To: git@vger.kernel.org
Subject: [BUG] Git add <device file> silently fails
Date: Sat, 17 Apr 2010 16:24:17 +0200 [thread overview]
Message-ID: <201004171624.17797.agruen@suse.de> (raw)
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
next reply other threads:[~2010-04-17 14:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-17 14:24 Andreas Gruenbacher [this message]
2010-04-17 14:44 ` [BUG] Git add <device file> silently fails 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201004171624.17797.agruen@suse.de \
--to=agruen@suse.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).