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

2016-10-11 Thread Duy Nguyen
On Tue, Oct 11, 2016 at 1:36 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >>> 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

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

2016-10-10 Thread Junio C Hamano
Duy Nguyen writes: >> 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

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

2016-10-09 Thread Stéphane Klein
2016-10-09 13:37 GMT+02:00 Duy Nguyen : > On Sun, Oct 9, 2016 at 6:22 PM, Stéphane Klein > wrote: >> 2016-10-09 13:11 GMT+02:00 Duy Nguyen : Why: 1. I configure worktree on my host 2. next I use this git

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

2016-10-09 Thread Duy Nguyen
On Sun, Oct 9, 2016 at 6:22 PM, Stéphane Klein wrote: > 2016-10-09 13:11 GMT+02:00 Duy Nguyen : > >>> * [worktree_foobar]/.git >> This is made absolute on purpose. So that if you move worktree_foobar >> away manually, it can still point back to >>

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

2016-10-09 Thread Stéphane Klein
2016-10-09 13:11 GMT+02:00 Duy Nguyen : >> * [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

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

2016-10-09 Thread Duy Nguyen
On Sat, Oct 8, 2016 at 4:35 PM, Stéphane Klein wrote: > Hi, > > "git worktree add" write absolute path in ".git/gitdir" > > The code source is here > https://git.kernel.org/cgit/git/git.git/tree/builtin/worktree.c?h=v2.10.1#n256 > > Is it possible to use relative path

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

2016-10-08 Thread Stéphane Klein
I've write a small tool in Golang to fix this issue: https://github.com/harobed/fix-git-worktree 2016-10-08 11:35 GMT+02:00 Stéphane Klein : > Hi, > > "git worktree add" write absolute path in ".git/gitdir" > > The code source is here >

Feature request: use relative path in worktree config files

2016-10-08 Thread Stéphane Klein
Hi, "git worktree add" write absolute path in ".git/gitdir" The code source is here https://git.kernel.org/cgit/git/git.git/tree/builtin/worktree.c?h=v2.10.1#n256 Is it possible to use relative path in this config files: * [main_worktree]/.git/worktrees/[worktree_foobar]/gitdir *