Skip to contentSkip to conversation

misc-sh: fix up whitespace in some other .sh files.

PATCH In review Jon Seymour 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc-sh: fix up whitespace in some other .sh files.

I found that the patched 4 files were different when this filter is applied.

	expand -i | unexpand --first-only

This patch contains the corrected files.

---
 generate-cmdlist.sh   |    4 ++--
 git-filter-branch.sh  |   12 ++++++------
 git-mergetool--lib.sh |    6 +++---
 git-rebase.sh         |    2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)
generate-cmdlist.sh +2 -2
index 3ef4861..1093ef4 100755
@@ -15,8 +15,8 @@ do
      sed -n '
      /^NAME/,/git-'"$cmd"'/H
      ${
-            x
-            s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
+	    x
+	    s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
 	    p
      }' "Documentation/git-$cmd.txt"
 done
git-filter-branch.sh +6 -6
index 962a93b..0d399aa 100755
@@ -12,7 +12,7 @@
 
 functions=$(cat << \EOF
 warn () {
-        echo "$*" >&2
+	echo "$*" >&2
 }
 
 map()
@@ -98,11 +98,11 @@ set_ident () {
 }
 
 USAGE="[--env-filter <command>] [--tree-filter <command>]
-            [--index-filter <command>] [--parent-filter <command>]
-            [--msg-filter <command>] [--commit-filter <command>]
-            [--tag-name-filter <command>] [--subdirectory-filter <directory>]
-            [--original <namespace>] [-d <directory>] [-f | --force]
-            [<rev-list options>...]"
+	    [--index-filter <command>] [--parent-filter <command>]
+	    [--msg-filter <command>] [--commit-filter <command>]
+	    [--tag-name-filter <command>] [--subdirectory-filter <directory>]
+	    [--original <namespace>] [-d <directory>] [-f | --force]
+	    [<rev-list options>...]"
 
 OPTIONS_SPEC=
 . git-sh-setup
git-mergetool--lib.sh +3 -3
index 91f90ac..9a89e8f 100644
@@ -79,7 +79,7 @@ get_merge_tool_cmd () {
 	fi
 	if diff_mode; then
 		echo "$(git config difftool.$merge_tool.cmd ||
-		        git config mergetool.$merge_tool.cmd)"
+			git config mergetool.$merge_tool.cmd)"
 	else
 		echo "$(git config mergetool.$merge_tool.cmd)"
 	fi
@@ -419,7 +419,7 @@ get_merge_tool_path () {
 	fi
 	if diff_mode; then
 		merge_tool_path=$(git config difftool."$merge_tool".path ||
-		                  git config mergetool."$merge_tool".path)
+				  git config mergetool."$merge_tool".path)
 	else
 		merge_tool_path=$(git config mergetool."$merge_tool".path)
 	fi
@@ -429,7 +429,7 @@ get_merge_tool_path () {
 	if test -z "$(get_merge_tool_cmd "$merge_tool")" &&
 	! type "$merge_tool_path" > /dev/null 2>&1; then
 		echo >&2 "The $TOOL_MODE tool $merge_tool is not available as"\
-		         "'$merge_tool_path'"
+			 "'$merge_tool_path'"
 		exit 1
 	fi
 	echo "$merge_tool_path"
git-rebase.sh +1 -1
index 266a4c1..6759702 100755
@@ -22,7 +22,7 @@ currently checked out branch is used.
 
 Example:       git-rebase master~1 topic
 
-        A---B---C topic                   A'\''--B'\''--C'\'' topic
+	A---B---C topic                   A'\''--B'\''--C'\'' topic
        /                   -->           /
   D---E---F---G master          D---E---F---G master
 '
Signature · 1 line
1.7.6.360.geebb0f
#1 lore raw
Quoted 11 lines · Jon Seymour
git-filter-branch.sh +0 -3
index 962a93b..0d399aa 100755
@@ -98,11 +98,11 @@ set_ident () {
 }
 
 USAGE="[--env-filter <command>] [--tree-filter <command>]
-            [--index-filter <command>] [--parent-filter <command>]
-            [--msg-filter <command>] [--commit-filter <command>]
-            [--tag-name-filter <command>] [--subdirectory-filter <directory>]

git-filter-branch.sh set_ident () { · line 108

Quoted 10 lines
git-filter-branch.sh +5 -2
-            [--original <namespace>] [-d <directory>] [-f | --force]
-            [<rev-list options>...]"
+	    [--index-filter <command>] [--parent-filter <command>]
+	    [--msg-filter <command>] [--commit-filter <command>]
+	    [--tag-name-filter <command>] [--subdirectory-filter <directory>]
+	    [--original <namespace>] [-d <directory>] [-f | --force]
+	    [<rev-list options>...]"
 
 OPTIONS_SPEC=
 . git-sh-setup

Everything other than this hunk is unquestionably fine. I think this one also is Ok but I wonder where the "Indented by 12 columns" comes from. "Usage: git filter-branch " that is prefixed to the first line is 25 columns long, so the "[--index-filter ..." on the second line would not align with "[--env-filter ..." on the first line to begin with.

And I do not think they need to align --- the point is if the second and subsequent lines do not aim to align with anything on the first line, it is just fine to indent them with a single HT, I think.

#2 lore raw
Quoted 30 lines · Junio C Hamano
Quoted 19 lines · Jon Seymour
git-filter-branch.sh +0 -0
index 962a93b..0d399aa 100755
@@ -98,11 +98,11 @@ set_ident () {
  }
 

 USAGE="[--env-filter <command>] [--tree-filter <command>]
-            [--index-filter <command>] [--parent-filter <command>]
-            [--msg-filter <command>] [--commit-filter <command>]
-            [--tag-name-filter <command>] [--subdirectory-filter <directory>]
-            [--original <namespace>] [-d <directory>] [-f | --force]
-            [<rev-list options>...]"
+         [--index-filter <command>] [--parent-filter <command>]
+         [--msg-filter <command>] [--commit-filter <command>]
+         [--tag-name-filter <command>] [--subdirectory-filter <directory>]
+         [--original <namespace>] [-d <directory>] [-f | --force]
+         [<rev-list options>...]"

Quoted 2 lines

 OPTIONS_SPEC=
 . git-sh-setup

Everything other than this hunk is unquestionably fine. I think this one also is Ok but I wonder where the "Indented by 12 columns" comes from. "Usage: git filter-branch " that is prefixed to the first line is 25 columns long, so the "[--index-filter ..." on the second line would not align with "[--env-filter ..." on the first line to begin with.

Quoted 4 lines

And I do not think they need to align --- the point is if the second and subsequent lines do not aim to align with anything on the first line, it is just fine to indent them with a single HT, I think

I double checked the actual output (e.g. with git filter-branch --X) and on the screen the output looks identical, although there is still whitespace difference. So, I think it is ok.

jon.