-
Notifications
You must be signed in to change notification settings - Fork 150
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
Fatal error when remote does not support shallow cloning #777
Comments
Because of the change in radian-software#714, we weren't triggering the recursive full clone when a shallow clone failed. straight--process-run returned the process result list (nonzero-exit-code etc...) instead of throwing an error. See: radian-software#777
Thanks, Henrik. Test Case(straight-bug-report
:user-dir "paredit.straight"
:post-bootstrap
(setq straight-vc-git-default-clone-depth 1)
(straight-use-package 'paredit)
(let
((default-directory
(straight--repos-dir "paredit")))
(message "paredit repo depth: %s"
(straight--process-output "git" "rev-list" "HEAD" "--count"))))
OutputTest run with version: prerelease (HEAD -> develop, origin/develop) 7ca94a7 2021-06-01
Cloning paredit...
Error: (error "Failed to run \"git\"; see buffer *straight-process*")
I've got a patch that seems to take care of it here: Test Case(straight-bug-report
:user-dir "paredit.straight"
:pre-bootstrap
(setq straight-repository-branch "fix/vc-git-clone-internal-recurse" straight-repository-user "progfolio")
:post-bootstrap
(setq straight-vc-git-default-clone-depth 1)
(straight-use-package 'paredit)
(let
((default-directory
(straight--repos-dir "paredit")))
(message "paredit repo depth: %s"
(straight--process-output "git" "rev-list" "HEAD" "--count"))))
OutputBootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Test run with version: prerelease (HEAD -> fix/vc-git-clone-internal-recurse, origin/fix/vc-git-clone-internal-recurse) 00be648 2021-06-02
Cloning paredit...
Cloning paredit...done
Building paredit...
Building paredit...done
paredit repo depth: 224
Packages:
"org-elpa" n/a n/a
"melpa" n/a master 45a02d8e 2021-06-03
"gnu-elpa-mirror" n/a master 6417888 2021-05-29
"el-get" melpa master d76ac84a 2021-04-28
"emacsmirror-mirror" n/a master a3cf645 2021-05-29
"straight" n/a fix/vc-git-clone-internal-recurse 00be648 2021-06-02
"paredit" melpa master 8330a41 2020-05-29
|
Should be fixed on latest "develop". Testing appreciated. |
This line throws |
Same issue with nov - had to manually perform a non-shallow clone. |
Can confirm this works perfectly now! Thank you for your work on straight and quick response! |
* Update Org mode references (#774) See: #771 * straight-use-package: guard against void native-comp deny list (#773) See: #772 * Remove advice to load org-contrib as a means to load Org (#775) org-contrib does not contain Org See: #774 * vc-git--clone-internal: lower git version requirement; refactor (#776) git's init -b switch requires git version >= 2.28. We can replicate this by renaming the master, which will work on older git versions, too. Use straight--process-run instead of straight--process-output, as we're not doing anything with the process output. See: #768 * vc-git--clone-internal: properly recurse when shallow clone fails (#778) Because of the change in #714, we weren't triggering the recursive full clone when a shallow clone failed. straight--process-run returned the process result list (nonzero-exit-code etc...) instead of throwing an error. See: #777 * vc-git--clone-internal: Remove vestigial function application (#779) * vc-git--clone-internal: properly recurse for failed shallow clone with pinned commit (#783) See: #782 * Add info program path customizations, straight--execuatable-find (#784) straight-makeinfo-executable: defcustom to set custom makeinfo path straight-install-info-executable: defcustom to set custom install-info path straight--executable-find: Wrapper for executable-find which allows us to throw uniform errors if a required executable is not found on the exec-path. * Add straight-remove-unused-repos (#785) Obsolete straight-x-clean-unused-repos See: #49 * Add straight-dependencies, straight-dependents (#787) See: #503 Co-authored-by: chrikoehn <ckoehn@informatik.uni-hamburg.de>
What's wrong
When performing a shallow clone of paredit (from the repo in its MELPA recipe: https://mumble.net/~campbell/git/paredit.git), I get this error:
The remote server does not support shallow cloning, it seems, which causes straight to abort with a fatal error.
Judging from
straight-vc-git--clone-internal
's docstring:It seems this should gracefully degrade to a full clone.
Directions to reproduce
Either:
git clone --depth=1 https://mumble.net/~campbell/git/paredit.git
Or:
Version information
The text was updated successfully, but these errors were encountered: