Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

make remove-dashes: apply to scripts and programs as well, not just t…

…o builtins

All programs and scripts are now moved outside PATH, so it's a good idea
not to use the dashed forms for them, either.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information...
commit b4f02d3509e8e4da0f115b9515d52daa02621db7 1 parent 6c98c05
Miklos Vajna authored July 11, 2008 gitster committed July 11, 2008

Showing 2 changed files with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. 2  Makefile
  2. 18  fixup-builtins
2  Makefile
@@ -1296,7 +1296,7 @@ check: common-cmds.h
1296 1296
 	for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
1297 1297
 
1298 1298
 remove-dashes:
1299  
-	./fixup-builtins $(BUILT_INS)
  1299
+	./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)
1300 1300
 
1301 1301
 ### Installation rules
1302 1302
 
18  fixup-builtins
... ...
@@ -1,16 +1,16 @@
1 1
 #!/bin/sh
2 2
 while [ "$1" ]
3 3
 do
4  
-	old="$1"
5  
-	new=$(echo "$1" | sed 's/git-/git /')
6  
-	echo "Converting '$old' to '$new'"
7  
-	git ls-files '*.sh' | while read file
8  
-	do
9  
-		sed "s/\\<$old\\>/$new/g" < $file > $file.new
10  
-		chmod --reference=$file $file.new
11  
-		mv $file.new $file
12  
-	done
  4
+	if [ "$1" != "git-sh-setup" -a "$1" != "git-parse-remote" -a "$1" != "git-svn" ]; then
  5
+		old="$1"
  6
+		new=$(echo "$1" | sed 's/git-/git /')
  7
+		echo "Converting '$old' to '$new'"
  8
+		sed -i "s/\\<$old\\>/$new/g" $(git ls-files '*.sh')
  9
+	fi
13 10
 	shift
14 11
 done
  12
+
  13
+sed -i 's/git merge-one-file/git-merge-one-file/g
  14
+s/git rebase-todo/git-rebase-todo/g' $(git ls-files '*.sh')
15 15
 git update-index --refresh >& /dev/null
16 16
 exit 0

0 notes on commit b4f02d3

Please sign in to comment.
Something went wrong with that request. Please try again.