ancestry

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(s string, ancestors int) string

Add adds an ancestry reference to the given string.

func Parse

func Parse(s string) (string, int)

Parse parses s for git ancestry references. It supports special characters ^ ~, both of which are supported by git. Note in git ^ and ~ have different meanings on commits that have multiple parent commits. In Pachyderm there's only 1 parent possible so they have identical meanings. We support both simply for familiarity sake. ParseAncestry returns the base reference and how many ancestors back to go. For example: foo^ -> foo, 1 foo^^ -> foo, 2 foo^3 -> foo 3 (all examples apply with ~ in place of ^ as well

Types

This section is empty.

Jump to

Keyboard shortcuts

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