summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xfixup-builtins16
-rw-r--r--git-filter-branch.sh2
3 files changed, 19 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 90597edfc7..5b30e5c864 100644
--- a/Makefile
+++ b/Makefile
@@ -988,7 +988,8 @@ check-sha1:: test-sha1$X
check: common-cmds.h
for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
-
+remove-dashes:
+ ./fixup-builtins $(BUILT_INS)
### Installation rules
diff --git a/fixup-builtins b/fixup-builtins
new file mode 100755
index 0000000000..49e861d2ac
--- /dev/null
+++ b/fixup-builtins
@@ -0,0 +1,16 @@
+#!/bin/sh
+while [ "$1" ]
+do
+ old="$1"
+ new=$(echo "$1" | sed 's/git-/git /')
+ echo "Converting '$old' to '$new'"
+ git ls-files '*.sh' | while read file
+ do
+ sed "s/\\<$old\\>/$new/g" < $file > $file.new
+ chmod --reference=$file $file.new
+ mv $file.new $file
+ done
+ shift
+done
+git update-index --refresh >& /dev/null
+exit 0
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index a2fcebc1c6..e9907598e5 100644
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -384,7 +384,7 @@ while read commit parents; do
sed -e '1,/^$/d' <../commit | \
eval "$filter_msg" | \
- sh -c "$filter_commit" git-commit-tree $(git-write-tree) $parentstr | \
+ sh -c "$filter_commit" "git-commit-tree" $(git-write-tree) $parentstr | \
tee ../map/$commit
done <../revs