Xcode 构建服务器。 Git 操作失败

Xcode Build server. Git operation failed

我的构建服务器出现错误。它看起来像这样:

Bot Issue for My OSX Project (build service error)

Integration #1300 of My OSX Project

Open in Xcode: xcbot://xwserver/botID/d127cd23bd4cee1081dfcc192904a85b/integrationID/699d47fa9105419469cca90c6a2a7286

Assertion: Could not open '/Library/Developer/XcodeServer/Integrations/Caches/d127cd23bd4cee1081dfcc192904a85b/Source/xwrtrunk/.git/logs/refs/remotes/origin/AnotherProjectFolderName'

for writing: Is a directory (-1) File: (null):(null)

Introduced 5 integrations ago

Full logs for this integration are attached.

当我更改 git 存储库时,一切都很好。但是这个 git 回购总是失败。我不知道我必须做什么。甚至没有想法。

我们做了什么:

P.S。无论如何感谢关注。

每当 XCode 的回购出现问题时,第一个解决方法是:

  • 再次克隆它。
  • 使 XCode 引用新克隆的 repo

OP ZevsVU (doing just that) adds :

We got this problem when I created a branch folder which name was equal to folder name in the repo.
We just deleted this branch and everything is great at the moment.


现在(2021 年第 4 季度)更好地呈现了类似问题的另一个实例:

参见 commit 66e905b, commit a7439d0 (25 Aug 2021) by René Scharfe (rscharfe)
(由 Junio C Hamano -- gitster -- in commit 7b06222 合并,2021 年 9 月 8 日)

xopen: explicitly report creation failures

Signed-off-by: René Scharfe

If the flags O_CREAT and O_EXCL are both given then open(2) is supposed to create the file and error out if it already exists.
The error message in that case looks like this:

fatal: could not open 'foo' for writing: File exists

Without further context this is confusing: Why should the existence of the file pose a problem? Isn't that a requirement for writing to it?

Add a more specific error message for that case to tell the user that we actually don't expect the file to preexist, so the example becomes:

fatal: unable to create 'foo': File exists