-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Shallow git clone #4939
Shallow git clone #4939
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4939 +/- ##
==========================================
+ Coverage 76.81% 76.81% +<.01%
==========================================
Files 158 158
Lines 10092 10093 +1
Branches 1270 1270
==========================================
+ Hits 7752 7753 +1
Misses 1998 1998
Partials 342 342
|
I do wonder if using a higher depth is a bit better. I mentioned back here that travis uses I think this is a great idea though. I'd be happy to either feature flag it, or just ship it and see what happens :) |
I'm fine with 50 as depth, and skip feature flag, but I wonder if those extensions really exist p: I'll try to search tomorrow. |
I just found https://github.com/OddBloke/sphinx-git and https://github.com/bitprophet/releases, not sure if some use those extensions to generate a full changelog, if not, looks like 50 as depth is good enough |
2b4b2c8
to
2d5bea3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really good change and will save a lot of data (and size) in our builders.
I don't think that this will break, but I'm not sure though. If you already tested it with different types of projects (small and big ones) I suppose we can ship it as is and see what happen with the rest.
I know that |
I think we should focus on git. It's definitely an 80/20 (or more) situation, so it gives us the most benefit. |
I tested this with projects that have a lot of versions, but I'll test this again because I want to be sure that this works with #4433 |
Tested this with master, still works |
I wonder if we can make this a default depth, but allow it to be user configurable, so that we have an answer if someone needs more history? We can't have this be a YAML option because we don't have the code on disk yet. I think we can ship this with what we have, but I do imagine we'll need a bit more configurability with it over time. |
To solve this we can:
Although, I don't think we will have any problem in the near future, at least. |
We can make this a web option, something like having all the history or just 50 commits |
Considering that we are using shallow clone now, shouldn't we use also
|
That only works when we are cloning the repo and the submodules at the same time, but we don't do that anymore. As the submodules update is separated, I found that we need to update the subdmodules' config to archive this https://stackoverflow.com/questions/2144406/how-to-make-shallow-git-submodules but that looks a little hacky, not sure |
This adds a project feature that allows us to use a standard clone and fetch rather than the shallow clone/fetch introduced in #4939. Eventually we should move this to the web UI, but doing so requires some work to make sure, for example, that git options are only show when 'Project.repo_type' is 'git'. Signed-off-by: Stephen Finucane <stephen@that.guru>
Close #1888
Tested this locally with a couple of projects, and I didn't find any problems. I also experiment with this outside rtd. The only downside I can see is people using an extension that needs to read the git history. So, this still needs a decision: