git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix t3701 if core.filemode disabled

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 20, 2008, 21:59 UTC
Message-ID
<20080520215932.GB10437@steel.home>
In-Reply-To
<20080519205550.GA24246@sigill.intra.peff.net>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Jeff King, Mon, May 19, 2008 22:55:50 +0200:
Show 12 quoted lines
> On Mon, May 19, 2008 at 10:23:42PM +0200, Alex Riesen wrote:
> 
> > > I setting core.filemode _inside_ the test breaks it in exactly the
> > > same way (on Linux, I'm at home). I'll retest tomorrow
> > 
> > It is "git init" which sets core.filemode false (of course!)
> 
> Ah, of course. In that case, then your change makes sense; by definition,
> if core.filemode isn't set, those tests are meaningless. Though I think
> a final version should, as we discussed, omit those tests rather than
> ending the test script.
> 

Sure. I have explicitely test for core.filemode=false, because some older setups (where git init did not set it) don't have the setting and git config core.filemode reports nothing.

 t/t3701-add-interactive.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index f15be93..bd94ac6 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -65,6 +65,7 @@ test_expect_success 'revert works (commit)' '
 	git add -i </dev/null >output &&
 	grep "unchanged *+3/-0 file" output
 '
+if test "$(git config core.filemode)" != false ; then
 
 test_expect_success 'patch does not affect mode' '
 	git reset --hard &&
@@ -84,5 +85,6 @@ test_expect_success 'stage mode but not hunk' '
 	git diff          file | grep "+content"
 '
 
+fi
 
 test_done
-- 
1.5.5.1.354.g902c
Previous: Jeff KingNext: Jeff King
Message 8 of 15 in “t3701 fails if core.filemode disabled”
  1. Alex RiesenMay 18, 2008
  2. Johannes SchindelinMay 18, 2008
  3. Alex RiesenMay 18, 2008
  4. Jeff KingMay 18, 2008
  5. Alex RiesenMay 18, 2008
  6. Alex RiesenMay 19, 2008
  7. Jeff KingMay 19, 2008
  8. Fix t3701 if core.filemode disabledAlex Riesen, May 20, 2008
  9. Jeff KingMay 21, 2008
  10. Alex RiesenMay 22, 2008
  11. Junio C HamanoMay 22, 2008
  12. Jeff KingMay 22, 2008
  13. Alex RiesenMay 22, 2008
  14. Mark LevedahlMay 19, 2008
  15. Alex RiesenMay 19, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.