submodule

package
v0.0.0-...-c44c8e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

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 Key

type Key string

Key is a map key for a submodule.

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.

func (Submodule) Key

func (s Submodule) Key() Key

Key returns the unique Key for the project.

type Submodules

type Submodules map[Key]Submodule

Submodules maps Keys to Submodules.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL