[Mesa-dev] [PATCH v2 2/2] bin/get-{extra, fixes}-pick-list.sh: improve output

Juan A. Suarez Romero jasuarez at igalia.com
Fri Apr 7 11:48:19 UTC 2017


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 at imgtec.com>
---
Forgot to use printf also in the get-extra-pick-list.

 bin/get-extra-pick-list.sh | 4 +++-
 bin/get-fixes-pick-list.sh | 7 +++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/bin/get-extra-pick-list.sh b/bin/get-extra-pick-list.sh
index df52e7a..657d5ba 100755
--- a/bin/get-extra-pick-list.sh
+++ b/bin/get-extra-pick-list.sh
@@ -42,7 +42,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
 
diff --git a/bin/get-fixes-pick-list.sh b/bin/get-fixes-pick-list.sh
index 1817300..ea064eb 100755
--- a/bin/get-fixes-pick-list.sh
+++ b/bin/get-fixes-pick-list.sh
@@ -41,7 +41,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
@@ -66,7 +67,9 @@ do
 			continue
 		fi
 
-		echo Commit $sha fixes $id
+		printf "Commit \"%s\" fixes %s\n" \
+		       "`git log -n1 --pretty=oneline $sha`" \
+		       "$id"
 	fi
 
 done
-- 
2.9.3



More information about the mesa-dev mailing list