mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
feat(sapling): add commit description field
This commit is contained in:
parent
5ec65ab373
commit
5beac7b8fb
|
@ -40,7 +40,7 @@ func (s *SaplingStatus) add(code string) {
|
|||
|
||||
const (
|
||||
SAPLINGCOMMAND = "sl"
|
||||
SLCOMMITTEMPLATE = "no:{node}\nns:{sl_node}\nnd:{sl_date}\nun:{sl_user}\nbm:{activebookmark}"
|
||||
SLCOMMITTEMPLATE = "no:{node}\nns:{sl_node}\nnd:{sl_date}\nun:{sl_user}\nbm:{activebookmark}\ndn:{desc|firstline}"
|
||||
)
|
||||
|
||||
type Sapling struct {
|
||||
|
@ -51,6 +51,7 @@ type Sapling struct {
|
|||
When string
|
||||
Author string
|
||||
Bookmark string
|
||||
Description string
|
||||
|
||||
Working *SaplingStatus
|
||||
}
|
||||
|
@ -147,6 +148,8 @@ func (sl *Sapling) setCommitContext() {
|
|||
sl.Author = line
|
||||
case "bm:":
|
||||
sl.Bookmark = line
|
||||
case "dn:":
|
||||
sl.Description = line
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,9 +46,10 @@ Display [sapling][sapling] information when in a sapling repository.
|
|||
### Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | --------------- | ------------------------------------- |
|
||||
| -------------- | --------------- | ------------------------------------------ |
|
||||
| `.RepoName` | `string` | the repo folder name |
|
||||
| `.Working` | `SaplingStatus` | changes in the worktree (see below) |
|
||||
| `.Description` | `string` | the first line of the commit's description |
|
||||
| `.Author` | `string` | the author of the commit |
|
||||
| `.Hash` | `string` | the full hash of the commit |
|
||||
| `.ShortHash` | `string` | the short hash of the commit |
|
||||
|
|
Loading…
Reference in a new issue