]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
SCRIPTS: git-show-backports: do not truncate git-show output
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 20 Jun 2024 09:22:59 +0000 (11:22 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 21 Jun 2024 13:08:42 +0000 (15:08 +0200)
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.

scripts/git-show-backports

index f2c40fec0cdd2c5c251c3d4e8ec2c4d223a22802..9f0a3dfda5496b918b1cac65dd1a17fecf31812c 100755 (executable)
@@ -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