Skip to content

git-backport: Fix sed errors with merge commits

Prarit Bhargava requested to merge prarit/tools:fix_mr_sed_error into main

git-backport returns an error on some merge request commits.

sed: invalid option -- '1'  

diffline indicates the beginning of the diff in a file. A merge request
may not have a diff so the resulting value of diffline is -1 which causes
the error.

Check for a minimum value for diffline (0).

Signed-off-by: Prarit Bhargava prarit@redhat.com

Merge request reports