refer to git://gist.github.com/2294435.git
I have no "/Library/Formula" or "~/Library/Formula" directory and no "cocot.rb" file any where.
brew doctor states that brew needs to be updated.
Hope you can resolve this problem.
The Library/Formula directory is in your brew prefix (probably /usr/local). cocot.rb was removed and then readded, and it appears that your local copy was not removed when it was deleted from Homebrew. If you delete the file, you should be able to update.
Let me know if you have any more problems!
The instructions was not clear ... i expected the Library/Formula directory to be located either in the root directory or in my home directory ... the cocot.rb was actually located in /usr/local/Library/Formula directory.
Prior your response, I uninstalled brew per instruction in the wiki and the reinstalled it.
I had to rm the ".git" directory in order to install brew.
cocot.rb file is still present in the latest version of brew.
cocot.rb should be present in an up to date version because it was readded to Homebrew. As long as brew update is working, you're fine.
I do not mean to be a PITA ...
After re-installing brew, I deleted cocot.rb and then ran brew update. It ran without a problem ... obviously I was up to date.
I had uninstalled brew version 0.9 .. same as the new one. When I ran brew update the result stated that I needed to delete cocot.rb. This started this thread.
We understand. However, there is nothing to fix here.
brew update is built on top of git; this error:
error: The following untracked working tree files would be overwritten by merge:
Please move or remove them before you can merge.
is a git error. Something caused this on-disk file to be out of sync with the repository.
As @mistydemeo said, if it's working now then there is nothing more to worry about.
Thanks, this solved the problem.
This solved my problem (with ninja.rb instead of cocot.rb) but I agree that the Library/Formula/ output is misleading. I tried / and ~/ before resorting to Google. Would be nice if it specified brew prefix.
It amazes me that people wouldn't check the brew prefix. It's like asking where the restroom is and the waitress says: "up stairs", and so you first go home and go upstairs, but it's not there, so then you go to the capital city in your country and can't find it, and then you go back to the restaurant and say: "WELL WHY DIDN'T YOU SAY IN THIS RESTAURANT? FFS EVERYONE ELSE BUT ME IS SO STUPID."
In fact I can't even improve this output since it is git's output and not under our control.
@mxcl I love what you've made and will continue to use it, but please stop acting like a complete jackass. The second comment was all that was needed.
Scripts bounce around directories all the time, so unqualified directory structures are actually very unhelpful. Given that there are other similar issues raised (e.g. http://github.com/mxcl/homebrew/issues/11448), this clearly goes against common standards.
Possibly this will fix it:
git --git-dir=/usr/local/.git fetch origin
Patch welcome. Possibly it will break something though, generally I would consider this not worth the risk for a 0.0001% edge case bug that affects two people who can't find directories under their noses.
Note, the directory needs to be changed to '/' first I expect. Definitely would push this if a patch is provided that has been thoroughly tested.