adding lock command, generalizing the checkfiletypes function

This commit is contained in:
2020-06-04 17:38:26 -04:00
parent 0276a1d776
commit db2221c515
8 changed files with 348 additions and 118 deletions

View File

@@ -2,14 +2,15 @@ package config
//Gvcconfig will be the struct that holds the entire client settings
type Gvcconfig struct {
Version string `toml:"version"`
RootPath string `toml:"rootPath"`
CurrentBranch string `toml:"currentbranch"`
LocalBranches []string `toml:"localbranches"` // LocalBranches constains a string list of branches on the local client. Names must be unique. \\TODO: someday add folders like git for branches
RemoteBranches []string `toml:"remotebranches"` // RemoteBranches constains a string list of branches on the server. Names must be unique. \\TODO: someday add folders like git for branches
Remotes []Remote `toml:"remote"` //The remote servers for the repo
Ignores Ignore `toml:"ignore"` //These files will be ignored for all add functions
NoCompress Ignore `toml:"nocompress"` //For binary compression some files should be ignored because the performance hit isn't worth the size savings
Version string `toml:"version"`
RootPath string `toml:"rootPath"`
Remotes []Remote `toml:"remote"` //The remote servers for the repo
CurrentBranch string `toml:"currentbranch"`
LocalBranches []string `toml:"localbranches"` // LocalBranches constains a string list of branches on the local client. Names must be unique. \\TODO: someday add folders like git for branches
RemoteBranches []string `toml:"remotebranches"` // RemoteBranches constains a string list of branches on the server. Names must be unique. \\TODO: someday add folders like git for branches
Locked FileTypes `toml:"locked"`
Ignores FileTypes `toml:"ignore"` //These files will be ignored for all add functions
NoCompress FileTypes `toml:"nocompress"` //For binary compression some files should be ignored because the performance hit isn't worth the size savings
}
//Remote will be a slice of remote server information
@@ -20,15 +21,8 @@ type Remote struct {
Default bool `toml:"default"` //Is this repo the default repo?
}
//Ignore is for ignoring files to add or ignoring compress
type Ignore struct {
Files []string `toml:"files"`
Exts []string `toml:"exts"`
Folders []string `toml:"folders"`
}
//Locked is a list of locked files/folders/wildcards
type Locked struct {
//FileTypes is for ignoring files to add or ignoring compress, or for locked files, all use the same type of struct (files, folders and exts)
type FileTypes struct {
Files []string `toml:"files"`
Exts []string `toml:"exts"`
Folders []string `toml:"folders"`