Skip to content

Add option to use shallow clone to save disk space when you just want to access the latest version of a repository.#81

Closed
jsenko wants to merge 9 commits intojenkinsci:masterfrom
jsenko:master
Closed

Add option to use shallow clone to save disk space when you just want to access the latest version of a repository.#81
jsenko wants to merge 9 commits intojenkinsci:masterfrom
jsenko:master

Conversation

@jsenko
Copy link
Contributor

@jsenko jsenko commented Aug 9, 2012

Cloning git repositories can cause high load on git server as well as on network. If would be nice to have an option in git plugin to perform only shallow clone. It could significantly reduce amount of transfered data.

@buildhive
Copy link

Jenkins » git-plugin #52 UNSTABLE
Looks like there's a problem with this pull request
(what's this?)

@jsenko
Copy link
Contributor Author

jsenko commented Aug 9, 2012

I am new to Jenkins, what is the best way to disable merging and git publisher (cannot merge and push when using shallow clone), when shallow clone is being used?

@ndeloof
Copy link
Contributor

ndeloof commented Aug 9, 2012

reading http://blogs.gnome.org/simos/2009/04/18/git-clones-vs-shallow-git-clones/
"
The git clone man page says that you cannot push your commits if you have a shallow clone. Apparently, there is no error message when you actually push your commits, so it is a situation that might bring problems in the repository in the future.
"
so I suggest when this option is set to check GitPublisher isn't used

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should explain the feature from a user point of view, not about implementation details to use --depth.

@buildhive
Copy link

Jenkins » git-plugin #53 UNSTABLE
Looks like there's a problem with this pull request
(what's this?)

@jsenko
Copy link
Contributor Author

jsenko commented Aug 9, 2012

That is odd. All tests pass when i build this on my computer.

@buildhive
Copy link

Jenkins » git-plugin #57 UNSTABLE
Looks like there's a problem with this pull request
(what's this?)

@vjuranek
Copy link
Member

I can confirm, that the tests pass fine locally. It seems Buildhive has some problem with creating file, most of the tests fail on assertion which checks whether newly created file exists. Fails for other pull requests (e.g. pull #82)

@ndeloof ndeloof closed this Aug 22, 2012
@ndeloof
Copy link
Contributor

ndeloof commented Aug 22, 2012

merged

@scrobbleme
Copy link

Could it be that this is broken? This options doesn't seem to work for us. Our checkouts are still very very large. Using --depth=1 locally works great.

We use the latest Jenkins and versions of the plugin.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants