On Tue, Sep 29, 2020 at 07:37:13PM +0000, Vivi, Rodrigo wrote: > Apparently #x86-32 as comment is breaking dim on the fixes flow. > > > $ tdim push drm-intel-next-fixes > dim: d6ec212e4a0d ("drm/i915/gem: Avoid implicit vmap for highmem on > x86-32"): Subject in fixes line doesn't match referenced commit: > dim: fb8621d3bee8 ("drm/i915: Avoid allocating a vmap arena for a single > page") #x86-32 > dim: ERROR: issues in commits detected, aborting > > Should we parse the comment out? > > if yes: > > a simple > > fixes_subject=$(echo "${BASH_REMATCH[2]}" | cut -d# -f1 > > didn't work out with current comparison flow.. > any suggestion for a clean parse and comparison?
Adjusting the regex to ignore an optional # suffix at the end should work better and more cleanly, something like the below. Totally untested. diff --git a/dim b/dim index c3a048db8956..a379bcbc897b 100755 --- a/dim +++ b/dim @@ -824,7 +824,8 @@ function checkpatch_fixes_tag [[ "$fline" =~ ^[[:space:]]*[Ff][Ii][Xx][Ee][Ss]:[[:space:]]*(.*)$ ]] fline="${BASH_REMATCH[1]}" - if [[ ! "$fline" =~ ^[[:space:]]*([[:xdigit:]]{5,})[[:space:]]*(.*)$ ]]; then + if [[ ! "$fline" =~ + ^[[:space:]]*([[:xdigit:]]{5,})[[:space:]]*(.*)([[:space:]]*#.*)?$ ]]; then echoerr "$cite: Malformed fixes line:" echoerr " $fline" rv=1 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dim-tools mailing list dim-tools@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dim-tools