On Thu, 17 Dec 2015, Daniel Vetter <daniel.vet...@ffwll.ch> wrote:
> git 2.5 gained native support for worktrees, so let's use them.
>
> Since this is fairly new I don't think we should switch the general
> dim setup over to using it (for e.g. the maintainer-tools and other
> auxiliary branches) since 2.5 was only released July 2015.

Ack.

>
> Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
> ---
>  dim | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index e30fc84a8567..854b5a61b399 100755
> --- a/dim
> +++ b/dim
> @@ -556,7 +556,14 @@ function create_workdir
>  
>               echo Creating separate workdir for $branch
>  
> -             $DRY git-new-workdir ${DIM_DRM_INTEL} $branch $branch
> +             if git help worktree &> /dev/null; then
> +                     # native worktree support was added in git 2.5
> +                     cd $DIM_DRM_INTEL
> +                     $DRY git worktree add $DIM_PREFIX/$branch $branch
> +                     cd $DIM_PREFIX
> +             else
> +                     $DRY git-new-workdir $DIM_DRM_INTEL $branch $branch
> +             fi
>       done
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to