All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dim: Add support for native git worktrees
@ 2015-12-17  8:42 Daniel Vetter
  2015-12-18 10:07 ` Jani Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2015-12-17  8:42 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

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.

Signed-off-by: Daniel Vetter <daniel.vetter@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
 }
 
-- 
2.6.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dim: Add support for native git worktrees
  2015-12-17  8:42 [PATCH] dim: Add support for native git worktrees Daniel Vetter
@ 2015-12-18 10:07 ` Jani Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2015-12-18 10:07 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

On Thu, 17 Dec 2015, Daniel Vetter <daniel.vetter@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.vetter@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-18 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-17  8:42 [PATCH] dim: Add support for native git worktrees Daniel Vetter
2015-12-18 10:07 ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.