On Fri, 02 Aug 2019, Jani Nikula <[email protected]> wrote: > On Fri, 05 Jul 2019, Arkadiusz Hiler <[email protected]> wrote: >> If patch happens to move lines around it's easy to end in a situation >> where we end up with errors just moving around: >> >> -error1:123 >> error2:124 >> +error1:125 >> >> With remapping, sorting and then diffing without context we end up with: >> -error1:123 >> +error1:123 >> >> Which is quite confusing and should not generate warning in the first >> place. >> >> This can be fixed by sorting the lines *after* the remapping. > > Pushed, thanks for the patch, and sorry for the delay. > > These are some of the more confusing lines for me in dim...
PS. dim sparse hangs if there are any config changes that require user input. BR, Jani. > > BR, > Jani. > >> >> Cc: Daniel Vetter <[email protected]> >> Reported-by: Oleg Vasilev <[email protected]> >> Signed-off-by: Arkadiusz Hiler <[email protected]> >> --- >> dim | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/dim b/dim >> index bada79c..1cfe090 100755 >> --- a/dim >> +++ b/dim >> @@ -1792,13 +1792,13 @@ function dim_sparse >> >> for commit in "${commits[@]}"; do >> touch --no-create $(git diff --name-only $commit~...$commit) >> - prev_sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 >> 1>/dev/null | sort)" >> + prev_sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 >> 1>/dev/null)" >> >> git checkout --detach $commit >/dev/null 2>&1 >> - sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 1>/dev/null | >> sort)" >> + sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 1>/dev/null)" >> >> prev_remapped="$(echo "$prev_sr" | $remap_log <(git diff HEAD~ >> | $remap_log))" >> - diff_result="$(diff -u <(echo "$prev_remapped") <(echo "$sr") >> || true)" >> + diff_result="$(diff -u <(echo "$prev_remapped" | sort) <(echo >> "$sr" | sort) || true)" >> >> echo "Commit: $(git log -n1 --format='%s' $commit)" >> if [ -n "$diff_result" ]; then -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dim-tools mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dim-tools
