submodule

package
v0.0.0-...-72e4f35 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2023 The Fuchsia Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 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