Re: [PATCH] Make the exit code of add_file_to_index actually useful
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2008, 23:32 UTC
- Message-ID
- <7vve1jw130.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080512224844.GI3128@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 16 quoted lines
> Junio C Hamano, Tue, May 13, 2008 00:19:42 +0200: > ... >> I would understand there can be some files that cannot be read. But when >> there is such a file, why is it Ok to ignore an error to update the >> contents from that file if/when the user asks to index the current >> contents, provided if the contents of that file is to be tracked? Isn't >> it the true cause of the problem that the file is being tracked but it >> shouldn't? > > No, I don't think so. Consider "git add dir/". It is _not_ 1 (one) > operation. It is many operations (add every file in the "dir/"). Why > should all of them be considered failed just because the third file > from the bottom could not be read (and the user may have not even seen > it, because it wasn't there before, like a temporary file from Excel). > And for a user (for me, at least) "git add" is an intermediate > operation anyway...
Ah, Ok, I was overly cautious, and the worry is unfounded, as long as you do not trigger this "ignore" thing upon "git commit -a".
Thanks. Will queue.