blob: d5d0df5ac7066c86be7cfb40834e278ffc71505c [file] [log] [blame]
// 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 gitutil
// CheckoutOpt is an interface for git checkout flags
type CheckoutOpt interface {
checkoutOpt()
}
// CloneOpt is an interface for git clone flags
type CloneOpt interface {
cloneOpt()
}
// DeleteBranchOpt is an interface for git branch deletion flags
type DeleteBranchOpt interface {
deleteBranchOpt()
}
// FetchOpt is an interface for git fetch flags
type FetchOpt interface {
fetchOpt()
}
// MergeOpt is an interface for git merge flags
type MergeOpt interface {
mergeOpt()
}
// PushOpt is an interface for git push flags
type PushOpt interface {
pushOpt()
}
// ResetOpt is an interface for git reset flags
type ResetOpt interface {
resetOpt()
}
// RebaseOpt is an interface for git rebase flags
type RebaseOpt interface {
rebaseOpt()
}
// SubmoduleUpdateOpt is an interface for git submodule update flags
type SubmoduleUpdateOpt interface {
submoduleUpdateOpt()
}
// SubmoduleStatusOpt is an interface for git submodule status flags
type SubmoduleStatusOpt interface {
submoduleStatusOpt()
}
// FollowTagsOpt is the 'follow-tags' git flag
type FollowTagsOpt bool
func (FollowTagsOpt) pushOpt() {}
// ForceOpt is the 'force' git flag
type ForceOpt bool
func (ForceOpt) checkoutOpt() {}
func (ForceOpt) deleteBranchOpt() {}
func (ForceOpt) pushOpt() {}
// DetachOpt is the 'detach' git flag
type DetachOpt bool
func (DetachOpt) checkoutOpt() {}
// ModeOpt is the mode argument for the 'mode' flag used by git reset
type ModeOpt string
func (ModeOpt) resetOpt() {}
// ResetOnFailureOpt flag enables a git reset of the merge if git merge errors
type ResetOnFailureOpt bool
func (ResetOnFailureOpt) mergeOpt() {}
// SquashOpt is the 'squash' git flag
type SquashOpt bool
func (SquashOpt) mergeOpt() {}
// StrategyOpt is the strategy argument for the 'strategy' flag used by git merge
type StrategyOpt string
func (StrategyOpt) mergeOpt() {}
// FfOnlyOpt is the 'ff-only' git flag
type FfOnlyOpt bool
func (FfOnlyOpt) mergeOpt() {}
// TagsOpt is the 'tags' git flag
type TagsOpt bool
func (TagsOpt) fetchOpt() {}
// FetchTagOpt is the tag argument for the 'tag' flag used by git fetch
type FetchTagOpt string
func (FetchTagOpt) fetchOpt() {}
// AllOpt is the 'all' git flag
type AllOpt bool
func (AllOpt) fetchOpt() {}
// PruneOpt is the 'prune' git flag
type PruneOpt bool
func (PruneOpt) fetchOpt() {}
// DepthOpt is the numeric argument for the 'depth' flag used by git
type DepthOpt int
func (DepthOpt) fetchOpt() {}
// UpdateShallowOpt is the 'update-shallow' git flag
type UpdateShallowOpt bool
func (UpdateShallowOpt) fetchOpt() {}
// VerifyOpt is the 'verify' git flag
type VerifyOpt bool
func (VerifyOpt) pushOpt() {}
// SharedOpt is the 'shared' git flag
type SharedOpt bool
func (SharedOpt) cloneOpt() {}
// ReferenceOpt is the reference argument for the git 'reference-if-able' flag used by git clone
type ReferenceOpt string
func (ReferenceOpt) cloneOpt() {}
// NoCheckoutOpt is the 'no-checkout' git flag
type NoCheckoutOpt bool
func (NoCheckoutOpt) cloneOpt() {}
func (DepthOpt) cloneOpt() {}
// BareOpt is the 'bare' git flag
type BareOpt bool
func (BareOpt) cloneOpt() {}
// OmitBlobsOpt is the 'filter=blob:none' (no binary blobs) git flag
type OmitBlobsOpt bool
func (OmitBlobsOpt) cloneOpt() {}
// RebaseMerges is the 'rebase-merges' git flag
type RebaseMerges bool
func (RebaseMerges) rebaseOpt() {}
// UpdateHeadOkOpt is the 'update-head-ok' git flag
type UpdateHeadOkOpt bool
func (UpdateHeadOkOpt) fetchOpt() {}
// OffloadPackfilesOpt is a flag used with git clone to fetch using https protocol
type OffloadPackfilesOpt bool
func (OffloadPackfilesOpt) cloneOpt() {}
// RecurseSubmodulesOpt is the 'recurse-submodules' git flag
type RecurseSubmodulesOpt bool
func (RecurseSubmodulesOpt) cloneOpt() {}
func (RecurseSubmodulesOpt) fetchOpt() {}
// InitOpt is the 'init' git flag
type InitOpt bool
func (InitOpt) submoduleUpdateOpt() {}
// JobsOpt is the numeric argument for the 'jobs' flag used by git
type JobsOpt uint
func (JobsOpt) fetchOpt() {}
// CachedOpt is the 'cached' git flag
type CachedOpt bool
func (CachedOpt) submoduleStatusOpt() {}