由Carthage定义的git子模块未被提取

时间:2016-02-22 14:27:24

标签: git github git-submodules ios-frameworks carthage

我使用Carthage导入几个框架作为git子模块。作为参考,回购可在github上获得。

Carthage创造了混合配置,导致无法构建新克隆的副本:

➜  IKnowKungFu git:(master) carthage update
*** Fetching Nimble
*** Fetching Quick
*** Fetching CleanroomLogger
*** Fetching CleanroomASL
Parse error: expected submodule commit SHA in output of task (ls-tree -z HEAD Carthage/Checkouts/CleanroomLogger) but encountered:

回购的新鲜克隆提供以下内容:

  • Carthage/Checkouts/Nimble
  • Carthage/Checkouts/Quick

存在但是是空文件夹。

运行git submodule update --init --recursive后:

  • Carthage/Checkouts/Nimble
  • Carthage/Checkouts/Quick
  • Carthage/Checkouts/Quick/Externals/Nimble

签出。但没有记忆:

  • Carthage/Checkouts/CleanroomASL
  • Carthage/Checkouts/CleanroomLogger

Cartfile

➜  IKnowKungFu git:(master) cat Cartfile
github "emaloney/CleanroomLogger"

Cartfile.private

➜  IKnowKungFu git:(master) cat Cartfile.private
github "Quick/Quick"
github "Quick/Nimble"

.gitmodules

➜  IKnowKungFu git:(master) cat .gitmodules
[submodule "Carthage/Checkouts/CleanroomASL"]
    url = https://github.com/emaloney/CleanroomASL.git
[submodule "Carthage/Checkouts/CleanroomLogger"]
    path = Carthage/Checkouts/CleanroomLogger
    url = https://github.com/emaloney/CleanroomLogger.git
[submodule "Carthage/Checkouts/Nimble"]
    path = Carthage/Checkouts/Nimble
    url = https://github.com/Quick/Nimble.git
[submodule "Carthage/Checkouts/Quick"]
    path = Carthage/Checkouts/Quick
    url = https://github.com/Quick/Quick.git

的.gitignore

➜  IKnowKungFu git:(master) cat .gitignore
###
### https://github.com/github/gitignore/blob/master/Swift.gitignore
###

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md

fastlane/report.xml
fastlane/screenshots


###
### https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
###

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

更新1

进一步研究表明,Carthage更新了Carthage/Checkouts/CleanroomASLCarthage/Checkouts/CleanroomLogger的.gitmodules条目,但未能创建160000目录指针以允许克隆子模块。

我所做的一切似乎都无法解决这个问题。包括

  • 从.gitmodules
  • 手动删除Cleanroom条目
  • 擦拭当地的迦太基文件夹
  • rm -rf ~/Library/Caches/org.carthage.CarthageKit

我对如何解决这个问题一无所知。

更新2

提交错误报告https://github.com/Carthage/Carthage/issues/1146

0 个答案:

没有答案