Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run brew update because of error: Failure while executing: git stash save --include-untracked --quiet #1255

Closed
pk2061 opened this issue Jan 19, 2025 · 9 comments

Comments

@pk2061
Copy link
Contributor

pk2061 commented Jan 19, 2025

I am trying to run brew update on my iMac G3 with tiger.

Unfortunately I am getting the following error:

imac-g3:~ jan$ brew update
Stashing your changes:
Error: Failure while executing: git stash save --include-untracked --quiet
imac-g3:~ jan$

I have git 2.48.1 already installed.

Can you please advice me what to do?

Thanks very much!

@jupo42
Copy link
Contributor

jupo42 commented Jan 19, 2025

Can you try running this command from issue #1093 and see if it works?

git config --global --add safe.directory /usr/local

@pk2061
Copy link
Contributor Author

pk2061 commented Jan 19, 2025

I have tried this, but it just gives me an "Illegal instruction" error:

imac-g3:~ jan$ git config --global --add safe.directory /usr/local
Illegal instruction

@sevan
Copy link
Collaborator

sevan commented Jan 19, 2025

@pk2061 Did you build git with GCC 4.2 on Tiger by any chance?

@pk2061
Copy link
Contributor Author

pk2061 commented Jan 19, 2025

I guess so.
I just ran „brew update“ and „brew upgrade“ some days ago and git and as also updated back then.

@sevan
Copy link
Collaborator

sevan commented Jan 19, 2025

If you look in ~/Library/Logs/Homebrew/git/01.gmake that'll tell you for definite. At the top of the file, a few lines down, was CC set to gcc-4.2?

If so, it seems that git is broken when built with gcc-4.2 on Tiger now, haven't investigated it, but Misty hit the issue a few days ago and added an exclusion.

@sevan
Copy link
Collaborator

sevan commented Jan 19, 2025

If you did build with GCC 4.2, brew uninstall git and reinstall, forcing GCC 4.0 by issuing brew install git --cc=gcc-4.0

@pk2061
Copy link
Contributor Author

pk2061 commented Jan 19, 2025

Thanks for clarifying where to look.

I guess I broke it myself.
In the log of 01.gmake i found CC=/usr/local/bin/gcc-7
I remebered I did some tinkering with the gcc symlink and set that to the wrong gcc version.

I am currently trying to reinstall git and let you know the result!

Thanks for the help & support so far! :)

@pk2061
Copy link
Contributor Author

pk2061 commented Jan 19, 2025

Just an update:
I reinstalled git again with brew install git --cc=gcc-4.0 it worked.

Also brew update works again as well!

Thanks again for the help!

@pk2061 pk2061 closed this as completed Jan 19, 2025
@mistydemeo
Copy link
Owner

Excellent, I'm glad it's resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants