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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

><

> On Oct 9, 2016, at 19:51, Jeremy Huddleston Sequoia <jeremyhu@xxxxxxxxxxxxxxx> wrote:
> 
> 
>> On Oct 9, 2016, at 17:15, Jeremy Huddleston Sequoia <jeremyhu@xxxxxxxxxxxxxxx> 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@xxxxxxxxx>
>> 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@xxxxxxxxx>
>>   Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
> 
> 
> 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
> #	
> 

<<attachment: smime.p7s>>


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]