gittools

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MarkCmd = &cobra.Command{
		Use:                "mark",
		Short:              "tools to create/revert/retag commit marks using a lightweight tag",
		FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
	}
	MarkArgs = MarkArguments{}
)
View Source
var (
	MarkCreateCmd = &cobra.Command{
		Use:                "create",
		Short:              "Mark current commit with given tag name. optionally commit local changes before mark",
		FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
		RunE:               RunCreateMark,
	}
	MarkCreateArgs = MarkCreateArguments{
		CommitMsg: "changes for git tagging",
	}
)
View Source
var (
	MarkReTagCmd = &cobra.Command{
		Use:                "retag",
		Short:              "mark current commit as a lightweight tag",
		FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
		RunE:               RunReTagMark,
	}
	MarkReTagArgs = MarkReTagArguments{}
)
View Source
var (
	MarkRevertCmd = &cobra.Command{
		Use:                "revert",
		Short:              "revert to the commit marked by given tag, without changing current branch",
		FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
		RunE:               RunRevertMark,
	}
	MarkRevertArgs = MarkRevertArguments{}
)
View Source
var (
	Cmd = &cobra.Command{
		Use:                "git",
		Short:              "Git plumbing tools",
		FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
	}
)

Functions

func RunCreateMark

func RunCreateMark(cmd *cobra.Command, _ []string) error

func RunReTagMark

func RunReTagMark(cmd *cobra.Command, _ []string) error

func RunRevertMark

func RunRevertMark(cmd *cobra.Command, _ []string) error

Types

type MarkArguments

type MarkArguments struct {
	MarkTag string `` /* 133-byte string literal not displayed */
}

type MarkCreateArguments

type MarkCreateArguments struct {
	Commit    bool   `flag:"include-local-changes" desc:"when set, local changes in worktree are commited before creating the mark"`
	CommitMsg string `flag:"commit-message,m" desc:"message used to commit local changes; ignored when 'include-local-changes' is not set. "`
}

type MarkReTagArguments

type MarkReTagArguments struct {
	SourceTag string `flag:"src-tag,s" desc:"the source tag name the re-tagging is based off. If not provided, current HEAD is used"`
}

type MarkRevertArguments

type MarkRevertArguments struct {
	DiscardLocal bool `flag:"force-discard-changes,f" desc:"when set, local changes are discarded"`
}

Jump to

Keyboard shortcuts

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