git

package
v0.0.0-...-d996d1d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2023 The ChromiumOS Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2023 The ChromiumOS Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCherryPick

func CheckCherryPick(
	ctx context.Context,
	httpClient *http.Client,
	tmpRoot string,
	changes sgerrit.Changes) []error

CheckCherryPick checks if the provided GerritChanges can be merged into their target project-branches without needing a rebase. It returns a list of errors of any failures to cherry pick, or an empty slice if all cherry picks are successful.

The provided changes may span various Gerrit instances, projects, and branches. Their ordering matters, as they will be cherry picked in order from first to last.

func Clone

func Clone(ctx context.Context, url string, branch string, parentDir string) (string, error)

Clone does a `git clone` on the provided repo URL into a subdirectory of the supplied dir, and returns the path to the folder of the checkout.

func FetchAndCherryPick

func FetchAndCherryPick(ctx context.Context, revision *gerrit.RevisionInfo, url string, repoDir string) (bool, error)

FetchAndCherryPick attempts to cherry-pick a provided Gerrit revision into the provided local Git repo. It returns a bool indicating whether further cherry picks can be performed. It also returns an error if this fails (e.g. if the cherry-pick won't merge successfully) or nil if the cherry-pick works alright.

Invocations of this method alter the supplied Git repo, so the order of invocations is important.

Types

This section is empty.

Jump to

Keyboard shortcuts

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