From: Ed L Cashin <ecashin@coraid.com>
To: git@vger.kernel.org
Subject: Re: git add / update-cache --add fails.
Date: Wed, 27 Apr 2005 12:48:43 -0400 [thread overview]
Message-ID: <87ll74go7o.fsf@coraid.com> (raw)
In-Reply-To: E1DQcOc-00054l-00@gondolin.me.apana.org.au
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Herbert Xu <herbert@gondor.apana.org.au> writes:
> Rhys Hardwick <rhys@rhyshardwick.co.uk> wrote:
>>
>> rhys@metatron:~/repo/learning.repo$ strace update-cache --add w1d4p1.c
> ...
>> open("w1d4p1.c", O_RDONLY) = -1 ENOENT (No such file or
>> directory)
>
> The file that you're trying to add doesn't exist.
Maybe the user should be informed as soon as update-cache knows that?
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 360 bytes --]
update-cache.c: 11388582a830a6161d1c769aa8616bed6f593b8a
--- a/update-cache.c
+++ b/update-cache.c
@@ -98,6 +98,7 @@ static int add_file_to_cache(char *path)
fd = open(path, O_RDONLY);
if (fd < 0) {
+ fprintf(stderr, "update-cache Error: %s\n", strerror(errno));
if (errno == ENOENT) {
if (allow_remove)
return remove_file_from_cache(path);
[-- Attachment #3: Type: text/plain, Size: 319 bytes --]
By the way, I created that patch with "git diff" in my git-pasky
working directory. Strangely, I had to redirect standard error to the
same place as standard output in order to get the filename in the diff
output. I didn't check why the filename is on standard error,
though.
--
Ed L Cashin <ecashin@coraid.com>
next prev parent reply other threads:[~2005-04-27 17:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 21:26 git add / update-cache --add fails Rhys Hardwick
2005-04-25 21:50 ` Rhys Hardwick
2005-04-25 21:52 ` Rhys Hardwick
2005-04-25 22:09 ` Chris Wedgwood
2005-04-26 0:47 ` Linus Torvalds
2005-04-26 6:26 ` Rhys Hardwick
2005-04-27 2:35 ` Herbert Xu
2005-04-27 16:48 ` Ed L Cashin [this message]
2005-04-27 17:30 ` Petr Baudis
2005-04-27 17:38 ` Ed L Cashin
2005-04-28 1:01 ` Paul Jackson
2005-04-28 1:05 ` Petr Baudis
2005-04-28 1:20 ` Paul Jackson
2005-04-26 1:38 ` 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=87ll74go7o.fsf@coraid.com \
--to=ecashin@coraid.com \
--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).