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

Support for shallow clones with git_repository skylark rules #4359

Closed
edbaunton opened this issue Dec 27, 2017 · 7 comments
Closed

Support for shallow clones with git_repository skylark rules #4359

edbaunton opened this issue Dec 27, 2017 · 7 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request

Comments

@edbaunton
Copy link
Contributor

As discussed in #1408 by @davidzchen, this issue tracks adding support for shallow clones to the git_repository skylark rules.

Also #1246 and #2696 related.

edbaunton added a commit to edbaunton/bazel that referenced this issue Dec 27, 2017
edbaunton added a commit to edbaunton/bazel that referenced this issue Dec 27, 2017
@hlopko hlopko added category: extensibility > skylark remote repositories P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request labels Jan 2, 2018
@edbaunton
Copy link
Contributor Author

Can someone with the requisite superpowers reopen this so that we don't lose track of the outstanding work discussed in #4537

@ittaiz
Copy link
Member

ittaiz commented Jan 30, 2018

I think it's a good idea to try and think of the use-cases (one dimension is how far is the commit from the tip)

@aehlig
Copy link
Contributor

aehlig commented Jan 31, 2018

Reopend by 40c757f.

@aehlig aehlig reopened this Jan 31, 2018
@aehlig aehlig added P2 We'll consider working on this in future. (Assignee optional) external-repos-triaged and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Jan 31, 2018
bazel-io pushed a commit that referenced this issue Feb 13, 2018
Add an optional 'shallow_since' parameter to new_git_repository to allow
more shallow clones. As opposed to a fixed depths, specifying a date does
not get outdated if the branch progresses further.

Also, use fully shallow clones if no commit is specified. A (floating)
branch or tag can always be cloned in a truly shallow fashion.

Improves on #4359.

Change-Id: I8459c8f55042c98da2e43f57b7960a291004d26b
PiperOrigin-RevId: 185504534
@aehlig aehlig added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed P2 We'll consider working on this in future. (Assignee optional) labels Feb 28, 2018
@aehlig
Copy link
Contributor

aehlig commented Feb 28, 2018

With shallow clones for tag and shallow_since for fixed commits we have a good enough work around to reduce priority.

@edbaunton
Copy link
Contributor Author

It's a bit of a shame this was done without any community discussion as I would like to have contributed. There appears to be no documentation on the expected date format, nor does there seem to be any tests for the above changeset.

werkt pushed a commit to werkt/bazel that referenced this issue Mar 2, 2018
@ittaiz
Copy link
Member

ittaiz commented Jul 16, 2018

is there still point in this issue given git itself doesn't support full shallow clones?

@aehlig
Copy link
Contributor

aehlig commented Jul 16, 2018

is there still point in this issue given git itself doesn't support full shallow clones?

Well, that's why we went the shallow_since path as truely shallow clones are usually not supported by git servers. And in theory, it would still be desirable—but you're right, given that git doesn't support it, there's not much bazel can do.

@aehlig aehlig closed this as completed Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants