[PATCH] dim: Change indentation from spaces to tabs

Arkadiusz Hiler arkadiusz.hiler at intel.com
Fri Dec 29 10:15:09 UTC 2017


Tabs are dominant. There are just a couple of places where spaces are
used, so let's fix them.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
 dim | 80 ++++++++++++++++++++++++++++++++++-----------------------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/dim b/dim
index 097a1602cfbb..966b81d8e608 100755
--- a/dim
+++ b/dim
@@ -567,7 +567,7 @@ function commit_rerere_cache
 
 	git add ./*.patch >& /dev/null || true
 	git add fixups/*.patch >& /dev/null || true
-	for file  in $(git ls-files -- rr-cache); do
+	for file in $(git ls-files -- rr-cache); do
 		if ! git log --since="60 days ago" --name-only -- $file | grep $file &> /dev/null; then
 			git rm $file &> /dev/null || true
 		fi
@@ -1334,7 +1334,7 @@ function check_maintainer
 	branch=$1
 	commit=$2
 
-        if [ "$branch" = "drm-intel-next-queued" ]; then
+	if [ "$branch" = "drm-intel-next-queued" ]; then
 		if non_i915_files=$(git diff-tree --no-commit-id --name-only -r $commit | \
 			grep -v "^\(drivers/gpu/drm/i915/\|include/drm/i915\|include/uapi/drm/i915\)") && [[ -n "$non_i915_files" ]]; then
 			echo -e "The following files are outside of i915 maintenance scope:\n"
@@ -1440,17 +1440,17 @@ function dim_checkpatch
 
 function _restore_head_on_exit
 {
-    local original_ref
+	local original_ref
 
-    original_ref="$(git rev-parse --abbrev-ref HEAD)"
+	original_ref="$(git rev-parse --abbrev-ref HEAD)"
 
-    if [ "$original_ref" == "HEAD" ]; then
-        original_ref="$(git rev-parse HEAD)"
-    fi
+	if [ "$original_ref" == "HEAD" ]; then
+		original_ref="$(git rev-parse HEAD)"
+	fi
 
-    # we want to expand this now
-    # shellcheck disable=SC2064
-    trap "git checkout -q $original_ref" EXIT
+	# we want to expand this now
+	# shellcheck disable=SC2064
+	trap "git checkout -q $original_ref" EXIT
 }
 
 function dim_sparse
@@ -1458,43 +1458,43 @@ function dim_sparse
 	local range rv sr prev_sr prev_remapped diff_result remap_log commits
 
 	range=$(rangeish "${1:-}")
-    remap_log=$DIM_PREFIX/maintainer-tools/remap-log
+	remap_log=$DIM_PREFIX/maintainer-tools/remap-log
 
-    if [ ! -e  $remap_log ]; then
-        echo "$remap_log is not compailed, please run make in maintainer-tools dir!"
-        exit 1
-    fi
+	if [ ! -e $remap_log ]; then
+		echo "$remap_log is not compailed, please run make in maintainer-tools dir!"
+		exit 1
+	fi
 
-    _restore_head_on_exit
+	_restore_head_on_exit
 
-    # make the initial reference build
-    commits=( $(git rev-list --reverse $range) )
-    git checkout --detach  ${commits[0]}~ > /dev/null 2>&1
-    make -j8 drivers/gpu/drm/ > /dev/null 2>&1
+	# make the initial reference build
+	commits=( $(git rev-list --reverse $range) )
+	git checkout --detach ${commits[0]}~ > /dev/null 2>&1
+	make -j8 drivers/gpu/drm/ > /dev/null 2>&1
 
 	for commit in "${commits[@]}"; do
-        touch --no-create $(git diff --name-only $commit~...$commit)
-        prev_sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 1>/dev/null | sort)"
+		touch --no-create $(git diff --name-only $commit~...$commit)
+		prev_sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 1>/dev/null | sort)"
 
-        git checkout --detach $commit >/dev/null 2>&1
-        sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 1>/dev/null | sort)"
+		git checkout --detach $commit >/dev/null 2>&1
+		sr="$(make C=1 -j$(nproc) drivers/gpu/drm/ 2>&1 1>/dev/null | sort)"
 
-        prev_remapped="$(echo "$prev_sr" | $remap_log <(git diff HEAD~ | $remap_log))"
-        diff_result="$(diff -u <(echo "$prev_remapped") <(echo "$sr") || true)"
+		prev_remapped="$(echo "$prev_sr" | $remap_log <(git diff HEAD~ | $remap_log))"
+		diff_result="$(diff -u <(echo "$prev_remapped") <(echo "$sr") || true)"
 
-        echo "Commit: $(git log -n1 --format='%s' $commit)"
-        if [ -n "$diff_result" ]; then
-            echo "$diff_result" | egrep '^[+-]' | egrep -v '^[+-]{3}'
-        else
-            echo "Okay!"
-        fi
-        echo
+		echo "Commit: $(git log -n1 --format='%s' $commit)"
+		if [ -n "$diff_result" ]; then
+			echo "$diff_result" | egrep '^[+-]' | egrep -v '^[+-]{3}'
+		else
+			echo "Okay!"
+		fi
+		echo
 
-        if (echo "$diff_result" | grep -q '^+'); then
-            rv=1
-        fi
+		if (echo "$diff_result" | grep -q '^+'); then
+			rv=1
+		fi
 
-        prev_sr="$sr"
+		prev_sr="$sr"
 	done
 
 	return $rv
@@ -2206,10 +2206,10 @@ shift $((OPTIND - 1))
 
 # first positional argument is the subcommand
 if [ -n "$HELP" ] || [ "$#" = "0" ]; then
-    subcommand="usage"
+	subcommand="usage"
 else
-    subcommand="$1"
-    shift
+	subcommand="$1"
+	shift
 fi
 
 # generic usage to be used for ${1:?$usage} style argument references
-- 
2.13.6



More information about the dim-tools mailing list