Documentation ¶
Overview ¶
This file contains some unexported code from go-git/go-git to use here https://github.com/go-git/go-git/blob/bf3471db54b0255ab5b159005069f37528a151b7/worktree_status.go The go-git original code is licensed under Apache-2.0
Index ¶
- Constants
- Variables
- type AsdRepository
- func (asd *AsdRepository) List(limit int, asdLimit int) error
- func (asd *AsdRepository) MinimumDuration() time.Duration
- func (asd *AsdRepository) RestoreByCommitHash(hashString string) error
- func (asd *AsdRepository) Save(msg string) error
- func (asd *AsdRepository) SetMinSeconds(s int) error
- func (asd *AsdRepository) ShouldSave() (bool, string, error)
Constants ¶
View Source
const AutosavedBranchPrefix = "_asd_"
start name with _ because it is the lowest alphabetically, therefore easier for users to scroll down and see the branches they created
Variables ¶
View Source
var ( ErrNothingToSave = errors.New("nothing to save") ErrAutosavedBranchNotCreated = errors.New("autosaved branch for current branch hasn't been created yet") ErrUserUnbornHead = errors.New("autosaved cannot continue with an unborn head. please make an initial commit and try again") ErrInvalidHash = errors.New("the hash submitted is not a valid hash") ErrUserDidNotConfirm = errors.New("user didn't confirm yes") ErrAutosavedBranchNotFound = errors.New("autosaved branch not found for this commit") )
Functions ¶
This section is empty.
Types ¶
type AsdRepository ¶
type AsdRepository struct { Repository *git.Repository // contains filtered or unexported fields }
func AsdRepoFromGitRepoPath ¶
func AsdRepoFromGitRepoPath(gitPath string, minSeconds int) (*AsdRepository, error)
func (*AsdRepository) MinimumDuration ¶
func (asd *AsdRepository) MinimumDuration() time.Duration
MinimumDuration returns the minimum duration without a commit that will go unsaved
func (*AsdRepository) RestoreByCommitHash ¶
func (asd *AsdRepository) RestoreByCommitHash(hashString string) error
func (*AsdRepository) Save ¶
func (asd *AsdRepository) Save(msg string) error
func (*AsdRepository) SetMinSeconds ¶
func (asd *AsdRepository) SetMinSeconds(s int) error
SetMinSeconds is the Setter method for the minSeconds configuration
func (*AsdRepository) ShouldSave ¶
func (asd *AsdRepository) ShouldSave() (bool, string, error)
Click to show internal directories.
Click to hide internal directories.