[Mesa-dev] [PATCH 1/2] bin/*sh: honor editorconfig formatting

Andres Gomez agomez at igalia.com
Fri May 5 13:09:41 UTC 2017


Signed-off-by: Andres Gomez <agomez at igalia.com>
---
 bin/bugzilla_mesa.sh       | 14 ++++-----
 bin/get-extra-pick-list.sh | 48 ++++++++++++++--------------
 bin/get-fixes-pick-list.sh | 78 +++++++++++++++++++++++-----------------------
 bin/get-pick-list.sh       | 32 +++++++++----------
 bin/get-typod-pick-list.sh | 36 ++++++++++-----------
 bin/shortlog_mesa.sh       | 24 +++++++-------
 6 files changed, 116 insertions(+), 116 deletions(-)

diff --git a/bin/bugzilla_mesa.sh b/bin/bugzilla_mesa.sh
index a8f5305844..c2579d4586 100755
--- a/bin/bugzilla_mesa.sh
+++ b/bin/bugzilla_mesa.sh
@@ -24,12 +24,12 @@ echo ""
 
 # extract fdo urls from commit log
 git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before | sort -n -u | sed -e $use_after |\
-while read url
-do
-	id=$(echo $url | cut -d'=' -f2)
-	summary=$(wget --quiet -O - $url | grep -e '<title>.*</title>' | sed -e 's/ *<title>[0-9]\+ – \(.*\)<\/title>/\1/')
-	echo "<li><a href=\"$url\">Bug $id</a> - $summary</li>"
-	echo ""
-done
+  while read url
+  do
+    id=$(echo $url | cut -d'=' -f2)
+    summary=$(wget --quiet -O - $url | grep -e '<title>.*</title>' | sed -e 's/ *<title>[0-9]\+ – \(.*\)<\/title>/\1/')
+    echo "<li><a href=\"$url\">Bug $id</a> - $summary</li>"
+    echo ""
+  done
 
 echo "</ul>"
diff --git a/bin/get-extra-pick-list.sh b/bin/get-extra-pick-list.sh
index b42085f2ab..6249852eeb 100755
--- a/bin/get-extra-pick-list.sh
+++ b/bin/get-extra-pick-list.sh
@@ -14,32 +14,32 @@ latest_branchpoint=`git merge-base origin/master HEAD`
 
 # Grep for commits with "cherry picked from commit" in the commit message.
 git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
-	grep "cherry picked from commit" |\
-	sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//'  > already_picked
+  grep "cherry picked from commit" |\
+  sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//'  > already_picked
 
 # For each cherry-picked commit...
 cat already_picked | cut -c -8 |\
-while read sha
-do
-	# ... check if it's referenced (fixed by another) patch
-	git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
-		cut -c -8 |\
-	while read candidate
-	do
-		# And flag up if it hasn't landed in branch yet.
-		if grep -q ^$candidate already_picked ; then
-			continue
-		fi
-		# Or if it isn't in the ignore list.
-		if [ -f bin/.cherry-ignore ] ; then
-			if grep -q ^$candidate bin/.cherry-ignore ; then
-				continue
-			fi
-		fi
-		printf "Commit \"%s\" references %s\n" \
-		       "`git log -n1 --pretty=oneline $candidate`" \
-		       "$sha"
-	done
-done
+  while read sha
+  do
+    # ... check if it's referenced (fixed by another) patch
+    git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
+      cut -c -8 |\
+      while read candidate
+      do
+        # And flag up if it hasn't landed in branch yet.
+        if grep -q ^$candidate already_picked ; then
+          continue
+        fi
+        # Or if it isn't in the ignore list.
+        if [ -f bin/.cherry-ignore ] ; then
+          if grep -q ^$candidate bin/.cherry-ignore ; then
+            continue
+          fi
+        fi
+        printf "Commit \"%s\" references %s\n" \
+               "`git log -n1 --pretty=oneline $candidate`" \
+               "$sha"
+      done
+  done
 
 rm -f already_picked
diff --git a/bin/get-fixes-pick-list.sh b/bin/get-fixes-pick-list.sh
index f1398f320c..3a5f48d292 100755
--- a/bin/get-fixes-pick-list.sh
+++ b/bin/get-fixes-pick-list.sh
@@ -17,55 +17,55 @@ git log --reverse --pretty=%H $latest_branchpoint > already_landed
 
 # ... and the ones cherry-picked.
 git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
-	grep "cherry picked from commit" |\
-	sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//'  > already_picked
+  grep "cherry picked from commit" |\
+  sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//'  > already_picked
 
 # Grep for commits with Fixes tag
 git log --reverse --pretty=%H -i --grep="fixes:" $latest_branchpoint..origin/master |\
-while read sha
-do
-	# Check to see whether the patch is on the ignore list ...
-	if [ -f bin/.cherry-ignore ] ; then
-		if grep -q ^$sha bin/.cherry-ignore ; then
-			continue
-		fi
-	fi
+  while read sha
+  do
+    # Check to see whether the patch is on the ignore list ...
+    if [ -f bin/.cherry-ignore ] ; then
+      if grep -q ^$sha bin/.cherry-ignore ; then
+        continue
+      fi
+    fi
 
-	# For each one try to extract the tag
-	fixes_count=`git show $sha | grep -i "fixes:" | wc -l`
-	if [ "x$fixes_count" != x1 ] ; then
-		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
-	id=`echo ${fixes} | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
+    # For each one try to extract the tag
+    fixes_count=`git show $sha | grep -i "fixes:" | wc -l`
+    if [ "x$fixes_count" != x1 ] ; then
+      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
+    id=`echo ${fixes} | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`
 
-	# Bail out if we cannot find suitable id.
-	# Any specific validation the $id is valid and not some junk, is
-	# implied with the follow up code
-	if [ "x$id" = x ] ; then
-		continue
-	fi
+    # Bail out if we cannot find suitable id.
+    # Any specific validation the $id is valid and not some junk, is
+    # implied with the follow up code
+    if [ "x$id" = x ] ; then
+      continue
+    fi
 
-	# Check if the offending commit is in branch.
+    # Check if the offending commit is in branch.
 
-	# Be that cherry-picked ...
-	# ... or landed before the branchpoint.
-	if grep -q ^$id already_picked ||
-	   grep -q ^$id already_landed ; then
+    # Be that cherry-picked ...
+    # ... or landed before the branchpoint.
+    if grep -q ^$id already_picked ||
+        grep -q ^$id already_landed ; then
 
-		# Finally nominate the fix if it hasn't landed yet.
-		if grep -q ^$sha already_picked ; then
-			continue
-		fi
+      # Finally nominate the fix if it hasn't landed yet.
+      if grep -q ^$sha already_picked ; then
+        continue
+      fi
 
-		printf "Commit \"%s\" fixes %s\n" \
-		       "`git log -n1 --pretty=oneline $sha`" \
-		       "$id"
-	fi
+      printf "Commit \"%s\" fixes %s\n" \
+             "`git log -n1 --pretty=oneline $sha`" \
+             "$id"
+    fi
 
-done
+  done
 
 rm -f already_picked
 rm -f already_landed
diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh
index 1bd0b367d8..495465fdfd 100755
--- a/bin/get-pick-list.sh
+++ b/bin/get-pick-list.sh
@@ -13,26 +13,26 @@ latest_branchpoint=`git merge-base origin/master HEAD`
 
 # Grep for commits with "cherry picked from commit" in the commit message.
 git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
-	grep "cherry picked from commit" |\
-	sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
+  grep "cherry picked from commit" |\
+  sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
 
 # Grep for commits that were marked as a candidate for the stable tree.
 git log --reverse --pretty=%H -i --grep='^CC:.*mesa-stable' $latest_branchpoint..origin/master |\
-while read sha
-do
-	# Check to see whether the patch is on the ignore list.
-	if [ -f bin/.cherry-ignore ] ; then
-		if grep -q ^$sha bin/.cherry-ignore ; then
-			continue
-		fi
-	fi
+  while read sha
+  do
+    # Check to see whether the patch is on the ignore list.
+    if [ -f bin/.cherry-ignore ] ; then
+      if grep -q ^$sha bin/.cherry-ignore ; then
+        continue
+      fi
+    fi
 
-	# Check to see if it has already been picked over.
-	if grep -q ^$sha already_picked ; then
-		continue
-	fi
+    # Check to see if it has already been picked over.
+    if grep -q ^$sha already_picked ; then
+      continue
+    fi
 
-	git log -n1 --pretty=oneline $sha | cat
-done
+    git log -n1 --pretty=oneline $sha | cat
+  done
 
 rm -f already_picked
diff --git a/bin/get-typod-pick-list.sh b/bin/get-typod-pick-list.sh
index eb4181d66b..e25c820934 100755
--- a/bin/get-typod-pick-list.sh
+++ b/bin/get-typod-pick-list.sh
@@ -17,26 +17,26 @@ latest_branchpoint=`git merge-base origin/master HEAD`
 
 # Grep for commits with "cherry picked from commit" in the commit message.
 git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
-	grep "cherry picked from commit" |\
-	sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
+  grep "cherry picked from commit" |\
+  sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
 
 # Grep for commits that were marked as a candidate for the stable tree.
 git log --reverse --pretty=%H -i --grep='^CC:.*mesa-dev' $latest_branchpoint..origin/master |\
-while read sha
-do
-	# Check to see whether the patch is on the ignore list.
-	if [ -f bin/.cherry-ignore ] ; then
-		if grep -q ^$sha bin/.cherry-ignore ; then
-			continue
-		fi
-	fi
-
-	# Check to see if it has already been picked over.
-	if grep -q ^$sha already_picked ; then
-		continue
-	fi
-
-	git log -n1 --pretty=oneline $sha | cat
-done
+  while read sha
+  do
+    # Check to see whether the patch is on the ignore list.
+    if [ -f bin/.cherry-ignore ] ; then
+      if grep -q ^$sha bin/.cherry-ignore ; then
+        continue
+      fi
+    fi
+
+    # Check to see if it has already been picked over.
+    if grep -q ^$sha already_picked ; then
+      continue
+    fi
+
+    git log -n1 --pretty=oneline $sha | cat
+  done
 
 rm -f already_picked
diff --git a/bin/shortlog_mesa.sh b/bin/shortlog_mesa.sh
index c9a4297236..7062beb695 100755
--- a/bin/shortlog_mesa.sh
+++ b/bin/shortlog_mesa.sh
@@ -14,16 +14,16 @@ in_log=0
 
 git shortlog $* | while read l
 do
-    if [ $in_log -eq 0 ]; then
-	echo '<p>'$l'</p>'
-	echo '<ul>'
-	in_log=1
-    elif echo "$l" | egrep -q '^$' ; then
-	echo '</ul>'
-	echo
-	in_log=0
-    else
-        mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&/g;s/</\</g;s/>/\>/g')
-	echo '  <li>'${mesg}'</li>'
-    fi
+  if [ $in_log -eq 0 ]; then
+    echo '<p>'$l'</p>'
+    echo '<ul>'
+    in_log=1
+  elif echo "$l" | egrep -q '^$' ; then
+    echo '</ul>'
+    echo
+    in_log=0
+  else
+    mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&/g;s/</\</g;s/>/\>/g')
+    echo '  <li>'${mesg}'</li>'
+  fi
 done
-- 
2.11.0



More information about the mesa-dev mailing list