Exclude dotfiles by default, add --include-dotfiles flag
Changed the default behavior to exclude dotfiles (files/dirs starting with .) which is the more common use case. Added --include-dotfiles flag for when hidden files need to be included in the manifest.
This commit is contained in:
@@ -40,7 +40,7 @@ func (mfa *CLIApp) freshenManifestOperation(ctx *cli.Context) error {
|
||||
|
||||
basePath := ctx.String("base")
|
||||
showProgress := ctx.Bool("progress")
|
||||
ignoreDotfiles := ctx.Bool("IgnoreDotfiles")
|
||||
includeDotfiles := ctx.Bool("IncludeDotfiles")
|
||||
followSymlinks := ctx.Bool("FollowSymLinks")
|
||||
|
||||
// Find manifest file
|
||||
@@ -112,7 +112,7 @@ func (mfa *CLIApp) freshenManifestOperation(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
// Handle dotfiles
|
||||
if ignoreDotfiles && pathIsHidden(relPath) {
|
||||
if !includeDotfiles && pathIsHidden(relPath) {
|
||||
if info.IsDir() {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user