Re: [PATCH v3 11/20] path: construct correct path to a worktree's index

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Brandon Williams wrote:
>
>> So your suggestion is to completely avoid doing any location when asking
>> for a worktree_git_path, I guess those code paths which request those
>> paths should be aware enough that if they need something in commondir to
>> use git_common_path instead.  My only worry is that it may be difficult
>> to catch misuse of worktree_git_path during code review, at least that
>> was one of the motivating factors for originally respecting
>> GIT_INDEX_FILE and the like.
>
> Correct: I'm saying that when someone calls worktree_git_path, the
> intent is to resolve a path within the worktree git directory.  File
> relocation just gets in the way of that.
>
> I am not too worried about misuse because the only reason to call
> worktree_git_path is to access a worktree-specific file like HEAD or
> index.

Until somebody has a brilliant idea "git_path() can be implemented
in terms of worktree_git_path()---give it the current worktree!" ;-)

Just joking.  I agree with the general direction you've shown in the
thread.

Thanks.



[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