git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Git Mailing List <git@vger.kernel.org>
Cc: msysGit <msysgit@googlegroups.com>,
	Junio C Hamano <gitster@pobox.com>, Johannes Sixt <j6t@kdbg.org>,
	Pat Thoyts <patthoyts@users.sourceforge.net>
Subject: [PATCH 2/4] t4120-apply-popt: help systems with core.filemode=false
Date: Thu,  3 Feb 2011 15:31:43 +0000	[thread overview]
Message-ID: <1296747105-1663-3-git-send-email-patthoyts@users.sourceforge.net> (raw)
In-Reply-To: <1296747105-1663-1-git-send-email-patthoyts@users.sourceforge.net>

From: Johannes Sixt <j6t@kdbg.org>

A test case verifies that filemode-only patches work as expected. Help
systems where "test -x" does not work by applying the test patch also to
the index, where the effects can be verified even on such systems.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 t/t4120-apply-popt.sh |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh
index 579c9e6..a33d510 100755
--- a/t/t4120-apply-popt.sh
+++ b/t/t4120-apply-popt.sh
@@ -6,6 +6,7 @@
 test_description='git apply -p handling.'
 
 . ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
 
 test_expect_success setup '
 	mkdir sub &&
@@ -62,8 +63,12 @@ test_expect_success 'apply (-p2) diff, mode change only' '
 	old mode 100644
 	new mode 100755
 	EOF
-	chmod 644 file1 &&
-	git apply -p2 patch.chmod &&
+	test_chmod -x file1 &&
+	git apply --index -p2 patch.chmod &&
+	case $(git ls-files -s file1) in 100755*) : good;; *) false;; esac
+'
+
+test_expect_success FILEMODE 'file mode was changed' '
 	test -x file1
 '
 
-- 
1.7.4.msysgit.0

  parent reply	other threads:[~2011-02-03 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 15:31 [PATCH] some test fixes for msysGit Pat Thoyts
2011-02-03 15:31 ` [PATCH 1/4] t3509: use unconstrained initial test to setup repository Pat Thoyts
2011-02-03 15:31 ` Pat Thoyts [this message]
2011-02-03 15:31 ` [PATCH 3/4] t7407: fix line endings for mingw build Pat Thoyts
2011-02-03 15:31 ` [PATCH 4/4] t5526: avoid dependency on submodule order Pat Thoyts
2011-02-03 20:08   ` [msysGit] " Johannes Sixt
2011-02-03 20:26     ` Johannes Schindelin
2011-02-03 20:56       ` Johannes Sixt
2011-02-04  8:41       ` [PATCH maint] start_command: flush buffers in the WIN32 code path as well Johannes Sixt
2011-02-04 11:23         ` Pat Thoyts
2011-02-03 16:29 ` [msysGit] [PATCH] some test fixes for msysGit Johannes Schindelin

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=1296747105-1663-3-git-send-email-patthoyts@users.sourceforge.net \
    --to=patthoyts@users.sourceforge.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=msysgit@googlegroups.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).