Closed yurikoles closed 7 years ago
Why? I need a reason. What isn’t working?
It fails to push with error like "shallow updates are not allowed", sorry I can't reproduce it now, because I have unshallowed all my repos.
I haven’t encountered this issue and haven’t got any other reports, so it may be something with your setup.
Will keep it in mind, though, and if more people encounter this, I’ll make the script use brew tap --full
when first tapping the repos.
It's reproducing. You can imagine how tired I was to repeat unshallowing after every (re-)install of brew so I wrote a script to automate it.
1 ✗ yurikoles@home ~ $ rm -rf /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/
0 ✓ yurikoles@home ~ $ brew tap caskroom/cask
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
fdroidserver mapnik sdl2_image webp (installed)
gd (installed) mldonkey sdl_image
gnuplot mscgen webkitgtk
==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 3665, done.
remote: Compressing objects: 100% (3649/3649), done.
remote: Total 3665 (delta 36), reused 298 (delta 12), pack-reused 0
Receiving objects: 100% (3665/3665), 1.22 MiB | 1.38 MiB/s, done.
Resolving deltas: 100% (36/36), done.
Tapped 0 formulae (3,674 files, 3.8M)
0 ✓ yurikoles@home ~ $ cask-repair deadbeef
Updating taps… Already up-to-date.
A `cask-repair` remote does not exist. Creating it now…
--------------------------------------------------------------------------------
cask 'deadbeef' do
version '0.7.2'
sha256 '09f588fc548f5faf1b58f07aafd0d65f5df1f8e00c143e80ddd879f02a7d33c0'
url 'https://downloads.sourceforge.net/deadbeef/travis/osx/master/deadbeef-devel-osx-x86_64.zip'
appcast 'https://sourceforge.net/projects/deadbeef/rss?path=/travis/osx/master',
checkpoint: 'df2ceb0eb07b78a7b1a4c1ebdc388ce157ac9eb1ca97792e66bf395bf4922844'
name 'DeaDBeeF'
homepage 'http://deadbeef.sourceforge.net/'
app 'deadbeef.app'
end
--------------------------------------------------------------------------------
Type the new version (or leave blank to use current one, or use `s` to skip)
>
Paste the new URL (or leave blank to use the current one)
>
==> Downloading external files for Cask ./deadbeef.rb
==> Downloading https://downloads.sourceforge.net/deadbeef/travis/osx/master/dea
######################################################################## 100,0%
==> No checksum defined for Cask deadbeef, skipping verification
==> Success! Downloaded to -> /Users/yurikoles/Library/Caches/Homebrew/Cask/dead
diff --git a/Casks/deadbeef.rb b/Casks/deadbeef.rb
index b67a17d..dba6a26 100644
--- a/Casks/deadbeef.rb
+++ b/Casks/deadbeef.rb
@@ -4,7 +4,7 @@ cask 'deadbeef' do
url 'https://downloads.sourceforge.net/deadbeef/travis/osx/master/deadbeef-devel-osx-x86_64.zip'
appcast 'https://sourceforge.net/projects/deadbeef/rss?path=/travis/osx/master',
- checkpoint: 'df2ceb0eb07b78a7b1a4c1ebdc388ce157ac9eb1ca97792e66bf395bf4922844'
+ checkpoint: '6a56a0934f2bc58cadbafaeeef20f7e4605b85d4af298dfe811173ff773f19f1'
name 'DeaDBeeF'
homepage 'http://deadbeef.sourceforge.net/'
--------------------------------------------------------------------------------
Is everything correct? ([y]es / [n]o / [e]dit) y
Submitting…
To github.com:yurikoles/homebrew-cask
! [remote rejected] cask-repair_update-deadbeef -> cask-repair_update-deadbeef (shallow update not allowed)
error: failed to push some refs to 'git@github.com:yurikoles/homebrew-cask'
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
There was an error submitting the pull request. Please open a bug report on the repo for this script.
@yurikoles Yes, I believe that it happens to you, but since you’ve already fixed it for yourself and I see no other users (or myself) with the same issue, I’d rather not touch it for now.
I just ran into this issue while trying to update PDFpenPro… git fetch --unshallow
in the Cask folder took care of the issue. Would be nice if this could be included as part of the cask-repair
script, reduces the barrier to entry for inexperienced users.
@vitorgalvao according to official doc brew tap
makes shallow clones by default.
Here’s the problem: I never encountered this issue, as haven’t the majority of users of this tool.
I’m willing to fix it for good, but I need someone willing to run a few commands and give me the results. Is there anyone that is able to reproduce this error consistently and on demand?
@vitorgalvao I had reproduced this error on every copy of macOS that I had my hands on, so I'm volunteering.
@yurikoles Thank you. I’ll basically give you a few different versions of cask-repair
with different tweaks, to first understand the error better. With that, I’ll be able to fix it more accurately. I ask that you grab the version and use it to submit casks, and post the output.
It reports Unprocessable Entity (HTTP 422)
. I think we just found the reason for this error message :)
Last line is strange
Last line is strange.
Indeed. For now, I’ll assume it was due to the previous commands not cleaning correctly and leaving you at the master branch.
Just released a new cask-repair
version. The unshallow repos bug should be squashed. Thank you for the help and fast responses, @yurikoles.
@vitorgalvao I had re-run cask-repair on this cask after launching it with -d
flag, and this message has gone.
Brew and taps clones are shallow by default. Please implement feature that will detect and automatically unshallow the clone, thanks. Also it may be useful to tap it with
--full
flag. I'm using following script by myself