Re: [PATCH] worktree: provide better prefix to go back to original cwd

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

 



On 06/10/10 06:59, Nguyán ThÃi Ngác Duy wrote:
> When both GIT_DIR and GIT_WORK_TREE are set, if cwd is outside worktree,
> prefix (the one passed to every builtin commands) will be set to NULL,
> which means "user stays at worktree topdir".
> 
> As a consequence, command line arguments are supposed to be relative
> to worktree topdir, not current working directory. Not very intuitive.
> Moreover, output from such situation is (again) relative to worktree
> topdir. Users are expected to understand that.
> 
> This patch allows builtin commands access to original cwd even if it's
> outside worktree, via cwd_to_worktree and worktree_to_cwd fields. As
> the name implies, if you stay at original cwd, "cd $(cwd_to_worktree)"
> would take you to worktree topdir and vice versa.
> 
> Signed-off-by: Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx>
> ---
>  startup_info->cwd_to_worktree would be as same as opt.submodule_prefix
>  in your 2/3 patch.

Thanks. I must admit I was struggling a little with implementing this
part. I'll be sending out a re-roll of my series shortly and I'll
include your patch if Junio doesn't pick it up on its own. I was also
planning on re-basing my patches on top of next or pu so more people can
actually compile it.
--
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]