• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nwinkler / bower / 11 / 2
87%
master: 85%

Build:
Build:
LAST BUILD BRANCH: fix-smart-git
DEFAULT BRANCH: master
Ran 24 Mar 2015 07:01AM UTC
Files 58
Run time 22s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Mar 2015 07:11PM UTC coverage: 86.626% (+0.004%) from 86.622%
NODE_VERSION=0.11

push

travis-ci

Nils Winkler
Automatically detecting _smart Git hosts_.

Added logic to automatically detect smart Git hosts that allow shallow
cloning. This is done by sending an `ls-remote` request to the server
and then evaluating the returned HTTP header fields. For this, Curl
verbose logging is enabled for the `ls-remote` request, since Curl
verbose logging sends the returned HTTP headers to `stderr`.

If the `stderr` output contains the desired header

  Content-Type: application/x-git-upload-pack-advertisement

then the server supports shallow cloning.

This approach uses Git and Curl for the heavy lifting. Instead of
implementing the request to the server using a simple HTTP client, Git
is used, since it takes care of authentication using stored credentials.

The used approach should also work for BitBucket, which only sends the
Content-Type header when a specific user agent is used. Using Git to
make the request enables this behavior.

The function to detect the smart Git host
(`GitRemoteResolver.prototype._supportsShallowCloning`) returns a
promise that is resolved when the server's request is evaluated. The
promise handling required an addition to `GitHubResolver.js` - to always
resolve the promise to `true`, since GitHub supports shallow cloning.

Added test cases to verify the new functionality.

3135 of 3619 relevant lines covered (86.63%)

29.03 hits per line

Source Files on job 11.2 (NODE_VERSION=0.11)
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 11
  • Travis Job 11.2
  • c86555a9 on github
  • Prev Job for NODE_VERSION=0.10 on detect-smart-git-rebase (#10.1)
  • Next Job for NODE_VERSION=0.11 on detect-smart-git-rebase (#12.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc