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

Add branch or ref to git deps #5335

Open
balsoft opened this issue Jun 26, 2020 · 0 comments
Open

Add branch or ref to git deps #5335

balsoft opened this issue Jun 26, 2020 · 0 comments

Comments

@balsoft
Copy link

balsoft commented Jun 26, 2020

Currently git dependencies only have two attributes: a URL of the repository and a commit SHA1. This works fine, but has an issue: it is generally inefficient: to find a commit without knowing what ref it belongs to, we generally have to fetch all of the repository.

Another problem (the one which is the reason for this feature request) is that it breaks compatibility with other tools, specifically Nix. See input-output-hk/haskell.nix#592 and NixOS/nix#2409 for the main issue I'm facing and motivation behind the way fetchGit works in nix respectively.

I propose to add an optional attribute of branch or ref, that would specify which reference the commit belongs to, and fetching only that reference when it is specified.

To be clear, I don't want to add the ability to specify git deps without commit, but merely allow to specify the branch/ref to which the commit belongs to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants