git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: [PATCH next] test-lib: set $DIFF to diff if it is unset
Date: Thu, 10 Jun 2010 11:39:49 +0200	[thread overview]
Message-ID: <06ffbe0ca6aac061336f6f595e89f75c09ab88ac.1276162629.git.trast@student.ethz.ch> (raw)

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

             reply	other threads:[~2010-06-10  9:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10  9:39 Thomas Rast [this message]
2010-06-10  9:46 ` [PATCH next] test-lib: set $DIFF to diff if it is unset Æ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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06ffbe0ca6aac061336f6f595e89f75c09ab88ac.1276162629.git.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).