core

package
v0.0.0-...-4d36164 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

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

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) List

func (asd *AsdRepository) List(limit int, asdLimit int) 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)

Jump to

Keyboard shortcuts

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