summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 289c4b3)
raw | patch | inline | side by side (parent: 289c4b3)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sat, 18 Feb 2006 12:01:18 +0000 (13:01 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 19 Feb 2006 07:16:09 +0000 (23:16 -0800) |
In some setups (notably server setups) you do not need that dependency.
Gracefully handle the absence of python when NO_PYTHON is defined.
Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Gracefully handle the absence of python when NO_PYTHON is defined.
Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/Makefile b/Makefile
index 1d3a0a47aa614d4b9047f02c5752bb41d0302eea..c8ee4a429689a06634970769f8a9d3c65b95486c 100644 (file)
--- a/Makefile
+++ b/Makefile
# Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
# a missing newline at the end of the file.
#
+# Define NO_PYTHON if you want to loose all benefits of the recursive merge.
+#
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
+ -e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
$@.sh >$@
chmod +x $@
### Testing rules
+# GNU make supports exporting all variables by "export" without parameters.
+# However, the environment gets quite big, and some programs have problems
+# with that.
+
+export NO_PYTHON
+
test: all
$(MAKE) -C t/ all
diff --git a/git-merge.sh b/git-merge.sh
index 74f07610fa2042ef0f2cb12c051d3be9139a680b..a05eeb29f6af4a60fab0d0b918cf319dbcbd3144 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
all_strategies='recursive octopus resolve stupid ours'
default_strategies='recursive'
use_strategies=
+if test "@@NO_PYTHON@@"; then
+ all_strategies='resolve octopus stupid ours'
+ default_strategies='resolve'
+fi
dropsave() {
rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" \
diff --git a/t/Makefile b/t/Makefile
index 5c5a62012673eaa7eec76da0068606bc78311fbd..ba6ddbec976f2ea0e4808d6549f93270e0c2b676 100644 (file)
--- a/t/Makefile
+++ b/t/Makefile
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
+ifdef NO_PYTHON
+ GIT_TEST_OPTS += --no-python
+endif
+
all: $(T) clean
$(T):
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index c339a366f4a107eeb12bdd596f2ade79a1f9f583..6729a18266e9539e3a3b34e200bdaee53e8a67a7 100755 (executable)
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
. ./test-lib.sh
-"$PYTHON" -c 'import subprocess' || {
+test "$no_python" || "$PYTHON" -c 'import subprocess' || {
echo >&2 'Your python seem to lack "subprocess" module.
Please check INSTALL document.'
exit 1
index e8606c751d6236ea7109359910a8e8adc01eb627..262381379f247a74f1656cfdd7f9b0c6d386d372 100755 (executable)
test_description='Test criss-cross merge'
. ./test-lib.sh
+if test "$no_python"; then
+ echo "Skipping: no python => no recursive merge"
+ test_done
+ exit 0
+fi
+
test_expect_success 'prepare repository' \
'echo "1
2
index 1292cafd7f1f7fc30b462d4e07be34383e9d6be9..a2d24b5ca95d971eccbb913c2a0eb84b7e87cd10 100755 (executable)
--- a/t/t6022-merge-rename.sh
+++ b/t/t6022-merge-rename.sh
test_description='Merge-recursive merging renames'
. ./test-lib.sh
+if test "$no_python"; then
+ echo "Skipping: no python => no recursive merge"
+ test_done
+ exit 0
+fi
+
test_expect_success setup \
'
cat >A <<\EOF &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 7a58a86f967fdb114bb980a631292da2cee2a352..43c8e55a8b5718fa4462f0b4cac07dd38c343d90 100755 (executable)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
exit 0 ;;
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
verbose=t; shift ;;
+ --no-python)
+ no_python=t; shift ;;
*)
break ;;
esac