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

Feature request: Have an option to disable git --depth 1 on opam source --dev #5061

Closed
kit-ty-kate opened this issue Feb 16, 2022 · 5 comments · Fixed by #5888
Closed

Feature request: Have an option to disable git --depth 1 on opam source --dev #5061

kit-ty-kate opened this issue Feb 16, 2022 · 5 comments · Fixed by #5888
Assignees
Milestone

Comments

@kit-ty-kate
Copy link
Member

When pulling the git sources of an opam package it would be nice to have an option to make it not use --depth 1 (or the opposite, remove the --depth 1 by default and add an option for that).
It would avoid having to do the annoying subsequant git pull --unshallow to it, to be able to push stuff to a fork for instance

@kit-ty-kate
Copy link
Member Author

kit-ty-kate commented Feb 23, 2024

Actually this is a change/regression in 2.2 (by #4442). Adding temporarily to the 2.2 project for discussion at the next dev meeting.

@kit-ty-kate
Copy link
Member Author

Something discovered is also that there seems to be an issue with caching. We might want to have a futher look at it.

$ opam source -vvvv integers --dev-repo
[...]
+ git "push" "$HOME/.opam/download-cache/git" "+refs/remotes/opam-ref:refs/remotes/947ec437042b4a98874a2870ccf8bb84" (CWD=$HOME/integers)
- To $HOME/.opam/download-cache/git
-  ! [remote rejected]       opam-ref -> 947ec437042b4a98874a2870ccf8bb84 (shallow update not allowed)
- erreur : impossible de pousser des références vers '$HOME/.opam/download-cache/git'

@shym
Copy link

shym commented Feb 26, 2024

A small suggestion regarding the interface: I would imagine in many cases users will know they should have used the opam option only when they are blocked later down the line, wouldn’t they? So I would suggest an extra message, teaching users the git --unshallow option, when a shallow clone is performed.
(The caching is more of a concern though)

@moyodiallo moyodiallo self-assigned this Mar 8, 2024
@moyodiallo
Copy link
Contributor

Something discovered is also that there seems to be an issue with caching. We might want to have a futher look at it.

$ opam source -vvvv integers --dev-repo
[...]
+ git "push" "$HOME/.opam/download-cache/git" "+refs/remotes/opam-ref:refs/remotes/947ec437042b4a98874a2870ccf8bb84" (CWD=$HOME/integers)
- To $HOME/.opam/download-cache/git
-  ! [remote rejected]       opam-ref -> 947ec437042b4a98874a2870ccf8bb84 (shallow update not allowed)
- erreur : impossible de pousser des références vers '$HOME/.opam/download-cache/git'

I think this could be in separate issue.

moyodiallo added a commit to moyodiallo/opam that referenced this issue Mar 19, 2024
moyodiallo added a commit to moyodiallo/opam that referenced this issue Mar 19, 2024
moyodiallo added a commit to moyodiallo/opam that referenced this issue Mar 20, 2024
@kit-ty-kate
Copy link
Member Author

kit-ty-kate commented Mar 20, 2024

I think this could be in separate issue.

i agree. Could you open it separately?

moyodiallo added a commit to moyodiallo/opam that referenced this issue Mar 25, 2024
kit-ty-kate pushed a commit to moyodiallo/opam that referenced this issue Mar 27, 2024
@kit-ty-kate kit-ty-kate added this to the 2.2.0~beta2 milestone Mar 28, 2024
moyodiallo added a commit to moyodiallo/opam that referenced this issue Apr 2, 2024
rjbou pushed a commit to rjbou/opam that referenced this issue Apr 4, 2024
rjbou pushed a commit to rjbou/opam that referenced this issue Apr 4, 2024
rjbou pushed a commit to moyodiallo/opam that referenced this issue Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants