From: Jonathan Nieder Date: Fri, 22 Aug 2008 06:38:02 GMT Subject: Re: [PATCH 3/3] git-add --intent-to-add (-N) Message-ID: In-Reply-To: <7vtzddd1z5.fsf@gitster.siamese.dyndns.org> Hi, Junio C Hamano wrote: > Didn't I already tell you that you seem to have picked only one out of > _three_ patch series? I am using all three patches. If you try ">a && git add -N a && git commit" in an empty repo, you should get the same behavior (I checked with commit 038a213^2, which is three commits ahead of master). And yes, I do understand where your suspicion came from. But the reason for the behavior is that update_one in cache-tree.c contains the test if (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1)) which fails for the empty blob in a new repo because, as I said, we don't have that sha1 file. I still wonder, do we want to pretend we have that object on disk and proceed with the commit, or are the hardcoded objects only supposed to be sufficient for in-core use? If the former, I will have to make some tests to be comfortable: are the objects properly transfered to older clients without the hardcoded objects, etc. But I don't want to bother if that is not the intent. Hoping that is clearer, Jonathan