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

Re: git 2.10.1 test regression in t3700-add.sh

From
Jeremy Huddleston Sequoia <jeremyhu@freedesktop.org>
Date
Oct 10, 2016, 03:46 UTC
Message-ID
<49BF26B2-8E6D-40B1-87A2-1FDDF9A76B8E@freedesktop.org>
In-Reply-To
<6CA5F44F-38C1-4C15-9B85-FE84FB93E616@freedesktop.org>
> On Oct 9, 2016, at 20:22, Jeremy Huddleston Sequoia <jeremyhu@freedesktop.org> wrote:
> 
> The issue is that the whitespace before the filename in $(git ls-files -s "$2") is a tab, and test_mode_in_index only looks for a space.
Actually, looks like that as just a rabbit hole.  The real issue looks to be because an earlier test drops down xfoo3 as a symlink, which causes this test to fail due to the collision.  I'll get out a patch in a bit.
Show 78 quoted lines
> 
>> <
> 
>> On Oct 9, 2016, at 19:51, Jeremy Huddleston Sequoia <jeremyhu@freedesktop.org> wrote:
>> 
>> 
>>> On Oct 9, 2016, at 17:15, Jeremy Huddleston Sequoia <jeremyhu@freedesktop.org> wrote:
>>> 
>>> Hi Thomas,
>>> 
>>> I wanted to let you know that this patch of yours, which landed in git 2.10.1, introduced some test failures, seen on macOS.
>>> 
>>> Let me know if you need any additional information to track these down.
>>> 
>>> Thanks,
>>> Jeremy
>>> 
>>> not ok 40 - git add --chmod=[+-]x changes index with already added file
>>> #	
>>> #		echo foo >foo3 &&
>>> #		git add foo3 &&
>>> #		git add --chmod=+x foo3 &&
>>> #		test_mode_in_index 100755 foo3 &&
>>> #		echo foo >xfoo3 &&
>>> #		chmod 755 xfoo3 &&
>>> #		git add xfoo3 &&
>>> #		git add --chmod=-x xfoo3 &&
>>> #		test_mode_in_index 100644 xfoo3
>>> #	
>>> 
>>> commit 610d55af0f082f6b866dc858e144c03d8ed4424c
>>> Author: Thomas Gummerer <t.gummerer@gmail.com>
>>> Date:   Wed Sep 14 22:07:47 2016 +0100
>>> 
>>>  add: modify already added files when --chmod is given
>>> 
>>>  When the chmod option was added to git add, it was hooked up to the diff
>>>  machinery, meaning that it only works when the version in the index
>>>  differs from the version on disk.
>>> 
>>>  As the option was supposed to mirror the chmod option in update-index,
>>>  which always changes the mode in the index, regardless of the status of
>>>  the file, make sure the option behaves the same way in git add.
>>> 
>>>  Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
>>>  Signed-off-by: Junio C Hamano <gitster@pobox.com>
>> 
>> 
>> This failure looks odd.  I'll dig into it a bit more as it looks like something odd is going on here...
>> 
>> expecting success: 
>> 	echo foo >foo3 &&
>> 	git add foo3 &&
>> 	git add --chmod=+x foo3 &&
>> 	test_mode_in_index 100755 foo3 &&
>> 	echo foo >xfoo3 &&
>> 	chmod 755 xfoo3 &&
>> 	git add xfoo3 &&
>> 	git add --chmod=-x xfoo3 &&
>> 	test_mode_in_index 100644 xfoo3
>> 
>> pass
>> cannot chmod 'xfoo3'fail
>> 120000 c5c4ca97a3a080c32920941b665e94a997901491 0	xfoo3
>> not ok 40 - git add --chmod=[+-]x changes index with already added file
>> #	
>> #		echo foo >foo3 &&
>> #		git add foo3 &&
>> #		git add --chmod=+x foo3 &&
>> #		test_mode_in_index 100755 foo3 &&
>> #		echo foo >xfoo3 &&
>> #		chmod 755 xfoo3 &&
>> #		git add xfoo3 &&
>> #		git add --chmod=-x xfoo3 &&
>> #		test_mode_in_index 100644 xfoo3
>> #	
>> 
> 
Previous: Jeremy Huddleston SequoiaNext: Junio C Hamano
Message 4 of 9 in “git 2.10.1 test regression in t3700-add.sh”
  1. Jeremy Huddleston SequoiaOct 10, 2016
  2. Jeremy Huddleston SequoiaOct 10, 2016
  3. Jeremy Huddleston SequoiaOct 10, 2016
  4. Jeremy Huddleston SequoiaOct 10, 2016
  5. Junio C HamanoOct 10, 2016
  6. Junio C HamanoOct 10, 2016
  7. Johannes SixtOct 10, 2016
  8. Jeremy Huddleston SequoiaOct 11, 2016
  9. Junio C HamanoOct 12, 2016

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.