Re: [PATCH v3] git-apply: apply submodule changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sven Verdoolaege <skimo@xxxxxxxxxx> writes:

>>  - what does ce have to do in this codepath?  read_old_data()
>>    does not care about what is in the index (in fact, in the
>>    index the entry can be a symlink when the path on the
>>    filesystem is a regular file, and it reads from the regular
>>    file as asked--it does not even look at ce by design).  
>>    if you have a regular file there in the current version, ce
>>    would say it is a regular file blob and you would not want
>>    read_gitlink_or_skip() to say "Subproject commit xyz...".
>
> Hmmm... the documentation says that if --index is in effect
> then the file to be patched in the work tree is supposed to be 
> up-to-date.

But that is the job of check_patch(), not this function, isn't it?

>> The type-mismatch case to attempt to apply gitlink patch to a
>> regular blob is covered much earlier in check_patch().  It
>> complains if st_mode does not match patch->old_mode; I think you
>> need to adjust it a bit to:
>> 
>>  - allow gitlink patch to a path that currently has nothing (no
>>    submodule checked out) or a directory that has ".git/"
>>    (i.e. submodule checked out).
>> 
>>  - reject gitlink patch otherwise.
>
> Are you talking about the case where --index is specified?

Talking about both cases, and the division of responsibility
between check_patch() and apply_data().

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux