bower/bower — pull request #1559 by nwinkler (2014-10-08 07:10:39+00:00)
Title: Configuration support for enabling/disabling shallow cloning

Added a configuration option in the .bowerrc file to allow enabling/disabling the shallow clone feature per host.

This fixes #1558. Let me know if the configuration is acceptable. Another option would be to provide an array or comma separated list of hosts which allow shallow cloning, but this format provides greater flexibility. Let me know if you would like to see changes.

Since this adds a new option to the `.bowerrc` file, the documentation needs to be updated as well. Let me know if you want me to do this.

The configuration looks like this:

```
{
"hosts": [
{
"name": "services.sungard.com",
"shallowClone": true
}
]
}
```

The `hosts` element accepts an array of host entries, each one with a `name` and a `shallowClone` attribute. The name of the host is matched against the target host in the clone/install command.

If the target host is not part of the configuration, or no `hosts` configuration has been provided at all, Bower defaults to _false_ for the shallow clone feature, the current default behavior for all non-GitHub repos.

I hope this addresses the issue described in #1389, #886 and #1393, which took a bit of a shotgun approach by disabling shallow cloning for everyone, even for hosts where it worked perfectly fine. I would like to see this PR (or a similar option) in Bower to allow a flexible setting for everyone. For us, disabling shallow cloning has a huge performance impact on our build process - and I would like to get that fixed as soon as possible.

Let me know if this PR (my first for Bower) is acceptable or whether you would like to see changes. Adapting the configuration to a different format shouldn't be too difficult.