Re: [PATCH 05/10] dim: support git worktree for aux checkouts

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

 



On Tue, Oct 18, 2016 at 3:38 PM, Jani Nikula
<jani.nikula@xxxxxxxxxxxxxxx> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux