show list patch error

This commit is contained in:
Jeff Carr 2025-01-17 09:47:21 -06:00
parent 4f282cc302
commit af84727178
4 changed files with 10 additions and 3 deletions

View File

@ -32,7 +32,7 @@ func (args) doBashAuto() {
case "pull":
fmt.Println("--all --mine --favorites --private")
case "patch":
fmt.Println("--list --submit --show")
fmt.Println("list --submit show")
case "dirty":
fmt.Println("--show-files")
case "user":

View File

@ -178,7 +178,9 @@ func main() {
}
if argv.Patch.List != nil {
listPatches()
if err := listPatches(); err != nil {
badExit(err)
}
okExit("patch list")
}
}

View File

@ -51,6 +51,9 @@ func listPatches() error {
last = strings.TrimSpace(line)
}
parts := strings.Fields(last)
if len(parts) == 0 {
return fmt.Errorf("listPatches() there are no patchsets at this time")
}
getPatch(parts[0])
return nil
}

View File

@ -79,7 +79,9 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
})
s.grid.NewButton("List Patchsets", func() {
listPatches()
if err := listPatches(); err != nil {
log.Info(err)
}
})
s.grid.NewButton("Show Latest Patchset", func() {