MCPcopy
hub / github.com/git-lfs/git-lfs / determineIncludeExcludePaths

Function determineIncludeExcludePaths

commands/commands.go:509–529  ·  view source on GitHub ↗
(config *config.Configuration, includeArg, excludeArg *string, useFetchOptions bool)

Source from the content-addressed store, hash-verified

507}
508
509func determineIncludeExcludePaths(config *config.Configuration, includeArg, excludeArg *string, useFetchOptions bool) (include, exclude []string) {
510 if includeArg == nil {
511 if useFetchOptions {
512 include = config.FetchIncludePaths()
513 } else {
514 include = []string{}
515 }
516 } else {
517 include = tools.CleanPaths(*includeArg, ",")
518 }
519 if excludeArg == nil {
520 if useFetchOptions {
521 exclude = config.FetchExcludePaths()
522 } else {
523 exclude = []string{}
524 }
525 } else {
526 exclude = tools.CleanPaths(*excludeArg, ",")
527 }
528 return
529}
530
531func determineFilepathFilterCache(config *config.Configuration) filepathfilter.Option {
532 cacheSize := defaultFilepathFilterCacheSize

Calls 3

CleanPathsFunction · 0.92
FetchIncludePathsMethod · 0.80
FetchExcludePathsMethod · 0.80