Re: Feature request: use relative path in worktree config files

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

 



2016-10-09 13:11 GMT+02:00 Duy Nguyen <pclouds@xxxxxxxxx>:

>> * [worktree_foobar]/.git
> This is made absolute on purpose. So that if you move worktree_foobar
> away manually, it can still point back to
> "[main_worktree]/.git/worktrees/[woktree_foobar]".

Same problem if you move origin git repository.

>
>> Why:
>>
>> 1. I configure worktree on my host
>> 2. next I use this git working copy in Docker with volume share
>> 3. next I've some git error in Docker because config files use absolute path
>
> I think the common way of dealing with this in docker is put things in
> the same path where it actually is outside docker. If you have stuff
> at /path/to/foo, then you create the same /path/to/foo inside docker
> and bind the data to that path. Does that work?

It's not always possible. I can't in my project.

I think there are some pros and some cons for relative path and absolute path.
Maybe append a "--relative" option with `git worktree add` ?

I've converted all path to relative and all work with success.

What do you think to append this --relative option.

Best regards,
Stéphane




[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]