add --include-dotfiles: New option, perhaps useful for backups.
This commit is contained in:
parent
6038875ebe
commit
2f538dd65c
6 changed files with 36 additions and 16 deletions
|
@ -34,8 +34,12 @@ import Annex.ReplaceFile
|
|||
import Utility.Tmp
|
||||
|
||||
def :: [Command]
|
||||
def = [notBareRepo $ command "add" paramPaths seek SectionCommon
|
||||
"add files to annex"]
|
||||
def = [notBareRepo $ withOptions [includeDotFilesOption] $
|
||||
command "add" paramPaths seek SectionCommon
|
||||
"add files to annex"]
|
||||
|
||||
includeDotFilesOption :: Option
|
||||
includeDotFilesOption = flagOption [] "include-dotfiles" "don't skip dotfiles"
|
||||
|
||||
{- Add acts on both files not checked into git yet, and unlocked files.
|
||||
-
|
||||
|
@ -47,7 +51,8 @@ seek ps = do
|
|||
( start file
|
||||
, stop
|
||||
)
|
||||
go withFilesNotInGit
|
||||
skipdotfiles <- not <$> Annex.getFlag (optionName includeDotFilesOption)
|
||||
go $ withFilesNotInGit skipdotfiles
|
||||
ifM isDirect
|
||||
( go withFilesMaybeModified
|
||||
, go withFilesUnlocked
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue