Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH 3/3] git-add --intent-to-add (-N)

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:45:12

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help