From: Junio C Hamano Date: Fri, 13 May 2005 22:59:31 GMT Subject: Re: [PATCH] Resurrect diff-tree-helper -R Message-ID: <7vhdh691gs.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20050513224529.GF32232@pasky.ji.cz> PB> Sorry for replying after so much time, it looks like I missed this and PB> got here only after checking what change removed the mode: bits... PB> What do you think? FYI, here is a demonsrtation of what you have right now. Temporarily slurp in the test framework patch you hate so much to get t/test-lib.sh ;-), apply this to get t/t2000-diff.sh, cd to t and say sh ./t2000-diff.sh Signed-off-by: Junio C Hamano --- jit-diff 1: t/t2000-diff.sh # - HEAD: Fix git-diff-files for symlinks. # + (working tree) Created: t/t2000-diff.sh (mode:100755) --- /dev/null +++ b/t/t2000-diff.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Copyright (c) 2005 Junio C Hamano +# + +test_description='Test built-in diff output engine. + +' +. ./test-lib.sh + +echo >path0 'Line 1 +Line 2 +line 3' +cat path0 >path1 +chmod +x path1 +git-update-cache --add path0 path1 +mv path0 path0- +sed -e 's/line/Line/' path0 +chmod +x path0 +rm -f path1 +git-diff-files -p >current +cat >expected <<\EOF +Mode changed: path0 (100644->100755) +--- a/path0 ++++ b/path0 +@@ -1,3 +1,3 @@ + Line 1 + Line 2 +-line 3 ++Line 3 +Deleted: path1 +--- a/path1 ++++ /dev/null +@@ -1,3 +0,0 @@ +-Line 1 +-Line 2 +-line 3 +EOF + +test_expect_success 'cmp -s current expected' +test_done