Reduce nesting

This commit is contained in:
Steve Streeting 2016-07-15 10:34:27 +01:00
parent d063337d2f
commit 20b4d8a43d

@ -348,7 +348,11 @@ func newCustomAdapter(name string, dir Direction, path, args string, concurrent
func ConfigureCustomAdapters() {
pathRegex := regexp.MustCompile(`lfs.customtransfer.([^.]+).path`)
for k, v := range config.Config.AllGitConfig() {
if match := pathRegex.FindStringSubmatch(k); match != nil {
match := pathRegex.FindStringSubmatch(k)
if match == nil {
continue
}
name := match[1]
path := v
// retrieve other values
@ -372,8 +376,5 @@ func ConfigureCustomAdapters() {
if direction == "upload" || direction == "both" {
RegisterNewTransferAdapterFunc(name, Upload, newfunc)
}
}
}
}