Documentation ¶
Overview ¶
Package submodule handles analyzing and updating git submodule states.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateSuperproject ¶
func UpdateSuperproject(g *gitutil.Git, message string, jiriProjectsPath string, snapshotPaths map[string]string, outputJSONPath string, noCommit bool, superprojectRoot string) subcommands.ExitStatus
UpdateSuperproject updates the submodules at superProjectRoot to match the jiri project state
Types ¶
type Diff ¶
type Diff struct { NewSubmodules []DiffSubmodule `json:"new_submodules"` DeletedSubmodules []DiffSubmodule `json:"deleted_submodules"` UpdatedSubmodules []DiffSubmodule `json:"updated_submodules"` }
Diff structure enumerates the new, deleted and updated submodules when diffing between a set of submodules.
type DiffSubmodule ¶
type DiffSubmodule struct { Name string `json:"name,omitempty"` Path string `json:"path"` OldPath string `json:"old_path,omitempty"` Revision string `json:"revision"` OldRevision string `json:"old_revision,omitempty"` Remote string `json:"remote,omitempty"` }
DiffSubmodule structure defines the difference between the status of two submodules
type Submodule ¶
type Submodule struct { // Name is the name of the submodule in jiri projects. Name string `xml:"name,attr,omitempty"` // Revision is the revision the submodule. Revision string `xml:"revision,attr,omitempty"` // Path is the relative path starting from the superproject root. Path string `xml:"path,attr,omitempty"` // Remote is the remote for a submodule. Remote string `xml:"remote,attr,omitempty"` }
Submodule represents the status of a git submodule.
Click to show internal directories.
Click to hide internal directories.