Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit c74390e

Browse files
author
Junio C Hamano
committed
cherry is built-in, do not ship git-cherry.sh
Noticed by Rene; Makefile now has another maintainer's check target to catch this kind of mistakes. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 82cc8d8 commit c74390e

File tree

3 files changed

+39
-91
lines changed

3 files changed

+39
-91
lines changed

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -932,3 +932,8 @@ check-docs::
932932
*) echo "no link: $$v";; \
933933
esac ; \
934934
done | sort
935+
936+
### Make sure built-ins do not have dups and listed in git.c
937+
#
938+
check-builtins::
939+
./check-builtins.sh

check-builtins.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
{
4+
cat <<\EOF
5+
sayIt:
6+
$(foreach b,$(BUILT_INS),echo XXX $b YYY;)
7+
EOF
8+
cat Makefile
9+
} |
10+
make -f - sayIt 2>/dev/null |
11+
sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' |
12+
sort |
13+
{
14+
bad=0
15+
while read builtin
16+
do
17+
base=`expr "$builtin" : 'git-\(.*\)'`
18+
x=`sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base' \1/p' git.c`
19+
if test -z "$x"
20+
then
21+
echo "$base is builtin but not listed in git.c command list"
22+
bad=1
23+
fi
24+
for sfx in sh perl py
25+
do
26+
if test -f "$builtin.$sfx"
27+
then
28+
echo "$base is builtin but $builtin.$sfx still exists"
29+
bad=1
30+
fi
31+
done
32+
done
33+
exit $bad
34+
}

git-cherry.sh

-91
This file was deleted.

0 commit comments

Comments
 (0)