2018-08-12 13:04:47 +02:00
|
|
|
package commands
|
2018-08-12 11:31:27 +02:00
|
|
|
|
|
|
|
// File : A staged/unstaged file
|
2018-08-13 12:26:02 +02:00
|
|
|
type File struct {
|
2018-08-12 11:31:27 +02:00
|
|
|
Name string
|
|
|
|
HasStagedChanges bool
|
|
|
|
HasUnstagedChanges bool
|
|
|
|
Tracked bool
|
|
|
|
Deleted bool
|
|
|
|
HasMergeConflicts bool
|
|
|
|
DisplayString string
|
2018-08-28 11:12:35 +02:00
|
|
|
Type string // one of 'file', 'directory', and 'other'
|
2018-08-12 11:31:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Commit : A git commit
|
|
|
|
type Commit struct {
|
|
|
|
Sha string
|
|
|
|
Name string
|
|
|
|
Pushed bool
|
|
|
|
DisplayString string
|
|
|
|
}
|
|
|
|
|
|
|
|
// StashEntry : A git stash entry
|
|
|
|
type StashEntry struct {
|
|
|
|
Index int
|
|
|
|
Name string
|
|
|
|
DisplayString string
|
|
|
|
}
|
2018-08-12 13:04:47 +02:00
|
|
|
|
2018-08-13 12:26:02 +02:00
|
|
|
// Conflict : A git conflict with a start middle and end corresponding to line
|
|
|
|
// numbers in the file where the conflict bars appear
|
|
|
|
type Conflict struct {
|
2018-08-13 13:16:21 +02:00
|
|
|
Start int
|
|
|
|
Middle int
|
|
|
|
End int
|
2018-08-12 13:04:47 +02:00
|
|
|
}
|