[Intel-gfx] [PATCH 05/10] dim: support git worktree for aux checkouts
Daniel Vetter
daniel.vetter at ffwll.ch
Tue Oct 18 19:11:36 UTC 2016
On Tue, Oct 18, 2016 at 3:38 PM, Jani Nikula
<jani.nikula at linux.intel.com> wrote:
>> + if git help worktree &> /dev/null ; then
>> + cd $DIM_PREFIX/$DIM_DRM_INTEL
>> + remote=`get_remote_name $remote_url`
>> + if ! git branch | grep $name > /dev/null ; then
>
> The failure modes are annoying if there's a substring match for
> $name. Unfortunately grep -w is no good if you need to handle "-" too.
Hm, right. I copypasted this all over, but with drm-intel-* we have a
few clashes. Played around, and the following does exact matches and
gets the job done:
if [[ `git branch --list $name` != "" ]]
I'll roll this out in a follow up patch everywhere.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list