Skip to content

Commit a4c5cae

Browse files
a-denoyellecapflam
authored andcommitted
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 b27470f) Signed-off-by: Christopher Faulet <[email protected]>
1 parent 9ecf24b commit a4c5cae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/git-show-backports

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,13 @@ dump_commit_matrix | column -t | \
321321
echo
322322
echo
323323
echo "In order to show and/or apply all leftmost commits to current branch :"
324-
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[@]}"
324+
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[@]}"
325325
echo
326326
echo " git cherry-pick -sx ${left_commits[@]}"
327327
echo
328328
if [ "${left_commits[*]}" != "${right_commits[*]}" ]; then
329329
echo "In order to show and/or apply all rightmost commits to current branch :"
330-
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[@]}"
330+
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[@]}"
331331
echo
332332
echo " git cherry-pick -sx ${right_commits[@]}"
333333
echo

0 commit comments

Comments
 (0)