Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.4k stars 9.73k forks source link

If this is a surprise to you, then you should stash these modifications. #6589

Closed faxotherapy closed 5 years ago

faxotherapy commented 5 years ago

Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

What you were trying to do (and why)

Ensuring everything is OK with brew doctor

What happened (include command output)

Got a critical response:

Warning: You have uncommitted modifications to Homebrew.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /usr/local/Homebrew/Library && git stash && git clean -d -f

Oh, yes, I'm surprised!

As I'm not a git expert, I don't understand and don't know how to fix it. I'm scared running the above command.

However, I ran the commands:

cd /usr/local/Homebrew/Library
git status

Then, got the following messages (still I'm lost and don't know what to do)

Sur la branche master
Votre branche est Ă  jour avec 'origin/master'.

Chemins non fusionnés :
  (utilisez "git restore --staged <fichier>..." pour désindexer)
  (utilisez "git add <fichier>..." pour marquer comme résolu)
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/array_inquirer.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/backtrace_cleaner.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/benchmarkable.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/builder.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/concern.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/configurable.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/access.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/conversions.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/extract_options.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/grouping.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/inquiry.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/prepend_and_append.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/array/wrap.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/benchmark.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/big_decimal.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/big_decimal/conversions.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class/attribute.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class/attribute_accessors.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/class/subclasses.rb
        ajouté par nous :         Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/core_ext/date.rb

Fichiers non suivis:
  (utilisez "git add <fichier>..." pour inclure dans ce qui sera validé)
        Locks/

aucune modification n'a été ajoutée à la validation (utilisez "git add" ou "git commit -a")

To make things more annoying, it is written in French. So, I translate then:

Sur la branche master
Votre branche est Ă  jour avec 'origin/master'.

Chemins non fusionnés :
  (utilisez "git restore --staged <fichier>..." pour désindexer)
  (utilisez "git add <fichier>..." pour marquer comme résolu)
        ajouté par nous : 

Equates to:

On branch master
Your branch is up to date with 'origin/master'

Fusioned paths:
(use "git restore…
(use "git-add…
Add by us:

Then:

Fichiers non suivis:
  (utilisez "git add <fichier>..." pour inclure dans ce qui sera validé)
        Locks/

aucune modification n'a été ajoutée à la validation (utilisez "git add" ou "git commit -a")

Equates to:

Unfollowed files:
(use git-add…
No modification has been add to the validation

Sorry for not translating properly

What you expected to happen

I expect not to receive the above output. It never happened before. It suddently appears and I don't know why.

Step-by-step reproduction instructions (by running brew commands)

Only need to run brew doctor

I ran brew doctor and brew update several times and still same problem.

Here's my config:

HOMEBREW_VERSION: 2.1.13-45-g70f232a-dirty
ORIGIN: https://github.com/Homebrew/brew
HEAD: 70f232ada5817bf21a26355f357bfdc7d153f7b7
Last commit: 28 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 61d6ab98ec1d6e8f4e481e8f8563f3c0b0c790b5
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: --appdir=~/Applications/
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_NO_ANALYTICS: 1
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 10.0 build 1001
Git: 2.23.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: N/A
CLT headers: 10.3.0.0.1.1562985497
XQuartz: 2.7.11 => /opt/X11

Thanks for your time.

iMichka commented 5 years ago

Hi. That's weird, and should not have happened.

Lets try to reset everything (you will not loose your installed packages), do not worry. Please run: brew update-reset and brew update

Let us know if that help.

faxotherapy commented 5 years ago

Hi iMichka, thanks for your support. The command set works. Problem solved, issue disappeared.

iMichka commented 5 years ago

Glad you got it sorted out.

Bon week-end :)

chrisfinazzo commented 5 years ago

@iMichka FWIW, I got this message and had to reset as well. On 10.13.6 - in case there is some bug internal to Brew that needs to be squashed.