XCode 9.3新建议将所有objective-c项目的CLANG_ENABLE_OBJC_WEAK设置为YES。有人可以解释这个设置对非ARC应用程序意味着什么吗?
答案 0 :(得分:1)
据我所知,它允许您在非ARC代码中使用#!/bin/sh
if [ -e ./.git/MERGE_HEAD ]
then
echo This is a merge commit with conflicts. Checking to make sure the working set matches the merge diff.
# This is the commit we are merging into our branch (probably master or origin/master)
mergehead=$(cat .git/MERGE_HEAD)
# This is the last commit on our branch
orighead=$(cat .git/ORIG_HEAD)
# This is the common ancestor to the merge head and orig head
mergebase=$(git merge-base $mergehead $orighead)
# Find all the changes between the common ancestor and the merge head
linecountmerge=$(git diff-tree $mergebase $mergehead -r --name-only | wc -l)
# Find all files in the working set and staging area but exclude untracked files
# Remove files that start with a ' ' character as that represents unstaged files
# Split Renamed files into 2 lines since diff-tree stores these separately as an Add and Delete
linecountworking=$(git status -s -uno | egrep '^[^ ].*$' | sed 's/ -> /\r\n/g' | wc -l)
#Uncomment the following lines to produce these results to files for troubleshooting
#git diff-tree $mergebase $mergehead -r --name-status | sort > .git/mergediff.txt
#git status -s -uno | egrep '^[^ ].*$' | sed 's/^R/D/g;s/ -> /\r\nA /g;s/\"//g;s/ /\t/g' | sort > .git/workingset.txt
echo Found $linecountmerge files in the merge diff.
echo Found $linecountworking files in the working set.
percentage=$(($linecountworking*100/$linecountmerge))
minimumallowedpercentage=60
echo Working set file count is $percentage% of the merge diff file count.
if [ $percentage -lt $minimumallowedpercentage ]
then
echo
echo
echo !!! Working set file count is less than $minimumallowedpercentage% of the merge diff file count. !!!
echo This probably means that you removed files from the working set during a merge conflict, which is a BAD THING!
echo If you are SURE you still want to commit the changes, you will need to add --no-verify to the commit command.
echo
echo Merge commit aborted.
exit 1
fi
fi
属性,并且它们将自动填充。