bin/get-{extra,fixes}-pick-list.sh: improve output
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 5 Apr 2017 18:18:42 +0000 (20:18 +0200)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 20 Apr 2017 08:28:54 +0000 (10:28 +0200)
Show the commit hash and the title in a way that it is easier to copy
and paste in the bin/.cherry-ignore-extra file if we want to ignore
those commits for the future.

v2:
- Use printf instead echo (Eric Engestrom)

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
bin/get-extra-pick-list.sh
bin/get-fixes-pick-list.sh

index dbd5474befa0d4792aafef196ee93e36d990eaa1..b42085f2abad5ebd15af5fa9780007b21e7b961d 100755 (executable)
@@ -36,7 +36,9 @@ do
                                continue
                        fi
                fi
-               echo Commit $candidate references $sha
+               printf "Commit \"%s\" references %s\n" \
+                      "`git log -n1 --pretty=oneline $candidate`" \
+                      "$sha"
        done
 done
 
index 73afd0c22a16c351c6bc1567a318101a3ab5eb54..f1398f320c8381527ee88e9ff95ef8f49a75707d 100755 (executable)
@@ -34,7 +34,8 @@ do
        # For each one try to extract the tag
        fixes_count=`git show $sha | grep -i "fixes:" | wc -l`
        if [ "x$fixes_count" != x1 ] ; then
-               echo WARNING: Commit $sha has more than one Fixes tag
+               printf "WARNING: Commit \"%s\" has more than one Fixes tag\n" \
+                      "`git log -n1 --pretty=oneline $sha`"
        fi
        fixes=`git show $sha | grep -i "fixes:" | head -n 1`
        # The following sed/cut combination is borrowed from GregKH
@@ -59,7 +60,9 @@ do
                        continue
                fi
 
-               echo Commit $sha fixes $id
+               printf "Commit \"%s\" fixes %s\n" \
+                      "`git log -n1 --pretty=oneline $sha`" \
+                      "$id"
        fi
 
 done