models

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RENAME_SEPARATOR = " -> "

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name string
	// the displayname is something like '(HEAD detached at 123asdf)', whereas in that case the name would be '123asdf'
	DisplayName  string
	Recency      string
	Pushables    string
	Pullables    string
	UpstreamName string
	Head         bool
}

Branch : A git branch duplicating this for now

func (*Branch) Description

func (b *Branch) Description() string

func (*Branch) ID

func (b *Branch) ID() string

func (*Branch) RefName

func (b *Branch) RefName() string

type Commit

type Commit struct {
	Sha           string
	Name          string
	Status        string // one of "unpushed", "pushed", "merged", "rebasing" or "selected"
	Action        string // one of "", "pick", "edit", "squash", "reword", "drop", "fixup"
	Tags          []string
	ExtraInfo     string // something like 'HEAD -> master, tag: v0.15.2'
	Author        string
	UnixTimestamp int64

	// IsMerge tells us whether we're dealing with a merge commit i.e. a commit with two parents
	IsMerge bool
}

Commit : A git commit

func (*Commit) Description

func (c *Commit) Description() string

func (*Commit) ID

func (c *Commit) ID() string

func (*Commit) RefName

func (c *Commit) RefName() string

func (*Commit) ShortSha

func (c *Commit) ShortSha() string

type CommitFile

type CommitFile struct {
	// Parent is the identifier of the parent object e.g. a commit SHA if this commit file is for a commit, or a stash entry ref like 'stash@{1}'
	Parent string
	Name   string

	// PatchStatus tells us whether the file has been wholly or partially added to a patch. We might want to pull this logic up into the gui package and make it a map like we do with cherry picked commits
	PatchStatus int // one of 'WHOLE' 'PART' 'NONE'

	ChangeStatus string // e.g. 'A' for added or 'M' for modified. This is based on the result from git diff --name-status
}

CommitFile : A git commit file

func (*CommitFile) Description

func (f *CommitFile) Description() string

func (*CommitFile) ID

func (f *CommitFile) ID() string

type File

type File struct {
	Name                    string
	HasStagedChanges        bool
	HasUnstagedChanges      bool
	Tracked                 bool
	Deleted                 bool
	HasMergeConflicts       bool
	HasInlineMergeConflicts bool
	DisplayString           string
	Type                    string // one of 'file', 'directory', and 'other'
	ShortStatus             string // e.g. 'AD', ' A', 'M ', '??'
}

File : A file from git status duplicating this for now

func (*File) Description

func (f *File) Description() string

func (*File) ID

func (f *File) ID() string

func (*File) IsRename

func (f *File) IsRename() bool

func (*File) IsSubmodule

func (f *File) IsSubmodule(configs []*SubmoduleConfig) bool

func (*File) Matches

func (f *File) Matches(f2 *File) bool

returns true if the file names are the same or if a a file rename includes the filename of the other

func (*File) Names

func (f *File) Names() []string

Names returns an array containing just the filename, or in the case of a rename, the after filename and the before filename

func (*File) SubmoduleConfig

func (f *File) SubmoduleConfig(configs []*SubmoduleConfig) *SubmoduleConfig

type Remote

type Remote struct {
	Name     string
	Urls     []string
	Branches []*RemoteBranch
}

Remote : A git remote

func (*Remote) Description

func (r *Remote) Description() string

func (*Remote) ID

func (r *Remote) ID() string

func (*Remote) RefName

func (r *Remote) RefName() string

type RemoteBranch

type RemoteBranch struct {
	Name       string
	RemoteName string
}

Remote Branch : A git remote branch

func (*RemoteBranch) Description

func (r *RemoteBranch) Description() string

func (*RemoteBranch) FullName

func (r *RemoteBranch) FullName() string

func (*RemoteBranch) ID

func (r *RemoteBranch) ID() string

func (*RemoteBranch) RefName

func (r *RemoteBranch) RefName() string

type StashEntry

type StashEntry struct {
	Index int
	Name  string
}

StashEntry : A git stash entry

func (*StashEntry) Description

func (s *StashEntry) Description() string

func (*StashEntry) ID

func (s *StashEntry) ID() string

func (*StashEntry) RefName

func (s *StashEntry) RefName() string

type SubmoduleConfig

type SubmoduleConfig struct {
	Name string
	Path string
	Url  string
}

func (*SubmoduleConfig) Description

func (r *SubmoduleConfig) Description() string

func (*SubmoduleConfig) ID

func (r *SubmoduleConfig) ID() string

func (*SubmoduleConfig) RefName

func (r *SubmoduleConfig) RefName() string

type Tag

type Tag struct {
	Name string
}

Tag : A git tag

func (*Tag) Description

func (t *Tag) Description() string

func (*Tag) ID

func (t *Tag) ID() string

func (*Tag) RefName

func (t *Tag) RefName() string

Jump to

Keyboard shortcuts

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