Skip to content

Commit b25b83c

Browse files
committed
SCRIPTS: git-show-backports: list new commits and how to review them with -L
The new "-L" option is convenient for quick backport sessions, but it doesn't list the commit subjects nor the review command. Let's just add these to ease backport sessions. However we don't do it in quiet mode (-q) because the output is sometimes parsed by automatic backport scripts. (cherry picked from commit 226bb4b) Signed-off-by: Willy Tarreau <w@1wt.eu>
1 parent 4563187 commit b25b83c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

scripts/git-show-backports

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,16 @@ dump_commit_matrix | column -t | \
336336
elif [ -n "$SINCELAST" ]; then
337337
echo "Found ${#since_last[@]} commit(s) added to branch $REF since last backported commit $last_bkp:"
338338
echo
339+
if [ -z "$QUIET" ]; then
340+
for c in "${since_last[@]}"; do
341+
echo "$(git log -1 --pretty=" %h | %s" "$c")"
342+
done
343+
echo
344+
echo "In order to show and/or apply them all to current branch :"
345+
echo
346+
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' ${since_last[@]}"
347+
echo
348+
fi
339349
echo " git cherry-pick -sx ${since_last[@]}"
340350
echo
341351
elif [ -n "$MISSING" -a ${#left_commits[@]} -eq 0 ]; then

0 commit comments

Comments
 (0)