Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRepoNotFound = fmt.Errorf("Repository name not found in target path repository list")
Functions ¶
This section is empty.
Types ¶
type P ¶
type P struct {
// contains filtered or unexported fields
}
P, stores the pathspec attribute for git intended to be used for the multi repo case.
func (*P) GetRelativePathspec ¶
GetRelativePathspec returns the relative pathspec from the internal map.
func (*P) SelectReposByPath ¶
SelectReposByPath filter the repos from all the repository list by the pathspec where git add command will be executed.
Select all repos in case of target "." and set pathspecc to "." for all repos.
type RepoPathspecMap ¶
map the repo as key and pathspec as value
where repository is relative to the bobroot and pathspec is relative to the repository.
func ComputePossibleRepos ¶
func ComputePossibleRepos(path string) RepoPathspecMap
ComputePossibleRepos Compute all the possible repository path from the provided path starting from bobroot inside bob workspace and returns a map of string where key is repository path and value is the relative path from that repository.
repositories can be filtered later from the computed repository paths.
Example:
'bobroot/sample/path' => {".": 'bobroot/sample/path', "bobroot": 'sample/path', "bobroot/sample": 'path', ..}
can be interpreted this way, if the selected repository path is `bobroot/sample`, then pathspec for that target path would be only `path`, and so on.