databricks-cli/libs/git
shreyas-goenka 2c58deb2c5
Fall back to full Git clone if shallow clone is not supported (#775)
## Changes
Git repos hosted over HTTP do not support shallow cloning. This PR adds
retry logic if we detect shallow cloning is not supported.

Note I saw the match string `dumb http transport does not support
shallow capabilities` being reported in for different hosts on the
internet, so this should work accross a large class of git servers.
Howerver, it's not strictly necessary to have the `--depth` flag so we
can remove it if this issue is reported again.

## Tests
Tested manually. `bundle init` successfully downloads the private HTTP
repo reported during by internal user.
2023-09-15 09:14:51 +00:00
..
testdata Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00
testdata_view_ignore Hardcode `.databricks` ignore pattern to ensure we never sync the cache directory (#295) 2023-04-04 15:44:57 +02:00
clone.go Fall back to full Git clone if shallow clone is not supported (#775) 2023-09-15 09:14:51 +00:00
clone_test.go Fall back to full Git clone if shallow clone is not supported (#775) 2023-09-15 09:14:51 +00:00
config.go Locate and use global excludes file (#191) 2023-02-02 12:25:53 +01:00
config_test.go Locate and use global excludes file (#191) 2023-02-02 12:25:53 +01:00
fileset.go Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00
fileset_test.go Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00
ignore.go Move git package to libs/git (#189) 2023-01-31 19:19:16 +01:00
ignore_test.go Move git package to libs/git (#189) 2023-01-31 19:19:16 +01:00
reference.go Remove \r from new line print statments (#509) 2023-06-22 13:47:52 +02:00
reference_test.go Add git config block to bundle config (#356) 2023-04-26 16:54:36 +02:00
repository.go Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00
repository_test.go Add git config block to bundle config (#356) 2023-04-26 16:54:36 +02:00
utils.go Consolidate functions in libs/git (#652) 2023-08-10 09:36:42 +00:00
utils_test.go Consolidate functions in libs/git (#652) 2023-08-10 09:36:42 +00:00
view.go Hardcode `.databricks` ignore pattern to ensure we never sync the cache directory (#295) 2023-04-04 15:44:57 +02:00
view_test.go Never ignore root directory when enumerating files in a repository (#683) 2023-08-21 07:35:02 +00:00