git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] test-lib: set $DIFF to diff if it is unset
@ 2010-06-10  9:39 Thomas Rast
  2010-06-10  9:46 ` Ævar Arnfjörð Bjarmason
  2010-06-10 17:23 ` Brandon Casey
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Rast @ 2010-06-10  9:39 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Since 7b3bdbb (fixup: do not unconditionally disable "diff -u",
2010-05-31), test-lib.sh depends on having $DIFF set in the
environment for the construction of $GIT_TEST_CMP.  While this works
when called from the main Makefile, it fails if the tests are called
on their own and the user does not have $DIFF set.

Set it to 'diff' if it is unset, like the Makefile does.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

I have an uneasy feeling that I must be missing something, seeing as
this went unnoticed for 10 days...

 t/test-lib.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index b23a61d..4d89049 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -78,6 +78,7 @@ export EDITOR
 
 if test -z "$GIT_TEST_CMP"
 then
+	DIFF=${DIFF:-diff}
 	if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT"
 	then
 		GIT_TEST_CMP="$DIFF -c"
-- 
1.7.1.550.g553ab5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-15 15:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10  9:39 [PATCH next] test-lib: set $DIFF to diff if it is unset Thomas Rast
2010-06-10  9:46 ` Ævar Arnfjörð Bjarmason
2010-06-10 17:23 ` Brandon Casey
2010-06-11 16:15   ` Junio C Hamano
2010-06-11 16:26     ` Brandon Casey
2010-06-15 15:19       ` Brandon Casey
2010-06-11 16:34     ` Thomas Rast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).