From a4c5cae3bb07d0dc998ce10e41e56ae3ae2356cd Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 20 Jun 2024 11:22:59 +0200 Subject: [PATCH] SCRIPTS: git-show-backports: do not truncate git-show output git-show-backports lists a git-show command which can be used to inspect all commits subject to backport. This command specifies formatting option to reproduce default git-show output, especially for commit messages indented with 4 spaces character. However, it also add wrapping on message line longer than 72 characters. This reduce lisibility of messages where large info are written such as backtraces. Improve this by changing git-show format option. Use a limit value of 0 to disable wrapping while preserving indentation. This could be backported to every stable version to simplify backporting process. (cherry picked from commit b27470fd1d06acd6dc33161e1fdb6743f72770df) Signed-off-by: Christopher Faulet --- scripts/git-show-backports | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/git-show-backports b/scripts/git-show-backports index f2c40fec0..9f0a3dfda 100755 --- a/scripts/git-show-backports +++ b/scripts/git-show-backports @@ -321,13 +321,13 @@ dump_commit_matrix | column -t | \ echo echo echo "In order to show and/or apply all leftmost commits to current branch :" - echo " git show --pretty=format:'%C(yellow)commit %H%C(normal)%nAuthor: %an <%ae>%nDate: %aD%n%n%C(green)%C(bold)git cherry-pick -sx %h%n%n%w(72,4,4)%B%N' ${left_commits[@]}" + echo " git show --pretty=format:'%C(yellow)commit %H%C(normal)%nAuthor: %an <%ae>%nDate: %aD%n%n%C(green)%C(bold)git cherry-pick -sx %h%n%n%w(0,4,4)%B%N' ${left_commits[@]}" echo echo " git cherry-pick -sx ${left_commits[@]}" echo if [ "${left_commits[*]}" != "${right_commits[*]}" ]; then echo "In order to show and/or apply all rightmost commits to current branch :" - echo " git show --pretty=format:'%C(yellow)commit %H%C(normal)%nAuthor: %an <%ae>%nDate: %aD%n%n%C(green)%C(bold)git cherry-pick -sx %h%n%n%w(72,4,4)%B%N' ${right_commits[@]}" + echo " git show --pretty=format:'%C(yellow)commit %H%C(normal)%nAuthor: %an <%ae>%nDate: %aD%n%n%C(green)%C(bold)git cherry-pick -sx %h%n%n%w(0,4,4)%B%N' ${right_commits[@]}" echo echo " git cherry-pick -sx ${right_commits[@]}" echo