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

update.sh: add instruction to delete shallow file #9432

Closed
wants to merge 1 commit into from
Closed

update.sh: add instruction to delete shallow file #9432

wants to merge 1 commit into from

Conversation

michaels-lyft
Copy link

@michaels-lyft michaels-lyft commented Dec 6, 2020

I was still getting the following error even after running git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow and saw that the .git/shallow file was not removed after the git command.

Error: homebrew-cask is a shallow clone. To `brew update` first run:
  git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow

This change adds the instruction to delete the shallow file after the repo is unshallowed.

Related PR: #9383

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

@gromgit
Copy link
Member

gromgit commented Dec 6, 2020

Have you actually encountered a situation where git fetch --unshallow fails to complete the unshallow process (including the removal of .git/shallow), yet returns success?

If you have, that's a Git bug, and should be reported as such. Your addition would then also be a bug, since you're nuking shallowed state from a still-shallowed repo.

If not, your addition does nothing useful.

@michaels-lyft
Copy link
Author

Have you actually encountered a situation where git fetch --unshallow fails to complete the unshallow process (including the removal of .git/shallow), yet returns success?

If you have, that's a Git bug, and should be reported as such. Your addition would then also be a bug, since you're nuking shallowed state from a still-shallowed repo.

If not, your addition does nothing useful.

Hmm, I tried it again with another repo and git was able to delete the file. Never mind.

@michaels-lyft michaels-lyft deleted the michaels/update-instructions branch December 6, 2020 07:31
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 6, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants