From 285c6cbf3c8eeadb6d4d4c3203888809e1cc7a81 Mon Sep 17 00:00:00 2001 From: Jon Seymour Date: Fri, 5 Aug 2011 23:31:29 +1000 Subject: [PATCH 1/2] 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. Signed-off-by: Jon Seymour Signed-off-by: Junio C Hamano --- 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(-) diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 3ef4861d0..1093ef4ad 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -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 diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 962a93b58..0d399aa88 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -12,7 +12,7 @@ functions=$(cat << \EOF warn () { - echo "$*" >&2 + echo "$*" >&2 } map() @@ -98,11 +98,11 @@ set_ident () { } USAGE="[--env-filter ] [--tree-filter ] - [--index-filter ] [--parent-filter ] - [--msg-filter ] [--commit-filter ] - [--tag-name-filter ] [--subdirectory-filter ] - [--original ] [-d ] [-f | --force] - [...]" + [--index-filter ] [--parent-filter ] + [--msg-filter ] [--commit-filter ] + [--tag-name-filter ] [--subdirectory-filter ] + [--original ] [-d ] [-f | --force] + [...]" OPTIONS_SPEC= . git-sh-setup diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index 91f90acfb..9a89e8f31 100644 --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -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" diff --git a/git-rebase.sh b/git-rebase.sh index 266a4c13b..6759702c5 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -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 ' From 9dcca58db42e85e056c6523429204f367a671a0e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 5 Aug 2011 15:06:21 -0700 Subject: [PATCH 2/2] filter-branch.sh: de-dent usage string "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. 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. Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 0d399aa88..71d072baa 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -98,11 +98,11 @@ set_ident () { } USAGE="[--env-filter ] [--tree-filter ] - [--index-filter ] [--parent-filter ] - [--msg-filter ] [--commit-filter ] - [--tag-name-filter ] [--subdirectory-filter ] - [--original ] [-d ] [-f | --force] - [...]" + [--index-filter ] [--parent-filter ] + [--msg-filter ] [--commit-filter ] + [--tag-name-filter ] [--subdirectory-filter ] + [--original ] [-d ] [-f | --force] + [...]" OPTIONS_SPEC= . git-sh-setup