Reduce nesting
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user