【问题标题】:Why does Homebrew say "no git repository"?为什么 Homebrew 说“没有 git 存储库”?
【发布时间】:2016-09-22 15:08:05
【问题描述】:

运行brew --config 给出

HOMEBREW_VERSION: >1.0.0 (no git repository)
...

为什么会这样?我能做些什么来解决它?


HOMEBREW_VERSION: >1.0.0 (no git repository)
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: bbed7246bc5c5b7acb8c1d427d10b43e090dfd39
Last commit: 4 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ba0aa68066a89c0654152aba22819736b06987af
Core tap last commit: 77 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.10.0 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.2.4/bin/ruby
Java: 1.8.0_102
macOS: 10.11.6-x86_64
Xcode: 8.0
CLT: 7.3.1.0.1.1461711523
X11: 2.7.9 => /opt/X11

【问题讨论】:

标签: homebrew


【解决方案1】:

正如 cmets 中所说,这是 Homebrew 本身的错误,由 issue #1091 描述。

修复被this commit合并:

- HOMEBREW_VERSION="$(git describe --tags --dirty 2>/dev/null)"
+ HOMEBREW_VERSION="$(GIT_DIR="$HOMEBREW_REPOSITORY/.git" git describe --tags --dirty 2>/dev/null)"
if [[ -z "$HOMEBREW_VERSION" ]]
then
  HOMEBREW_VERSION=">1.0.0 (no git repository)"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-07-10
    • 2012-06-19
    • 1970-01-01
    • 2011-05-14
    • 2011-02-10
    • 2020-04-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多