Re: [PATCH v2 2/6] worktree: stop supporting moving worktrees manually

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

 



On Mon, Jan 18, 2016 at 6:21 AM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote:
> The current update_linked_gitdir() has a bug that can create "gitdir"
> file in non-multi-worktree setup. Worse, sometimes it can write relative
> path to "gitdir" file, which will not work (e.g. "git worktree list"
> will display the worktree's location incorrectly)
>
> Instead of fixing this, we step back a bit. The original design was
> probably not well thought out. For now, if the user manually moves a
> worktree, they have to fix up "gitdir" file manually or the worktree
> will get pruned.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
> diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
> @@ -33,10 +33,8 @@ The working tree's administrative files in the repository (see
>  If you move a linked working tree to another file system, or
> -within a file system that does not support hard links, you need to run
> -at least one git command inside the linked working tree
> -(e.g. `git status`) in order to update its administrative files in the
> -repository so that they do not get automatically pruned.
> +within a file system that does not support hard links, you need to update
> +$GIT_DIR/worktrees/<id>/gitdir so that they do not get automatically pruned.

It seems kind of sad to change this text in this patch and then
immediately change it again in the next patch. You could instead
combine the two patches (and add a "Helped-by: Eric" if you want to
credit me).
--
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]