@@ -14,7 +14,7 @@ import (
1414// @ (HEAD)
1515// @- (commit message)
1616func ActionHeadCommits (limit int ) carapace.Action {
17- return carapace . ActionExecCommand ( "jj" , "log" , "--no-graph" , "--template" , `description.first_line() ++ "\n"` , "--revisions" , "::@" , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
17+ return actionExecJJ ( "log" , "--no-graph" , "--template" , `description.first_line() ++ "\n"` , "--revisions" , "::@" , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
1818 lines := strings .Split (string (output ), "\n " )
1919
2020 vals := make ([]string , 0 )
@@ -30,7 +30,7 @@ func ActionHeadCommits(limit int) carapace.Action {
3030// 04 (build(deps): bump github.com/creack/pty from 1.1.18 to 1.1.20 (#8265))
3131// 03 (fix(release create): Handle latest flag value when updating the rel...)
3232func ActionPrevCommits (limit int ) carapace.Action {
33- return carapace . ActionExecCommand ( "jj" , "log" , "--no-graph" , "--template" , `commit_id.short() ++ "\t" ++ description.first_line() ++ "\n"` , "--revisions" , "::@" , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
33+ return actionExecJJ ( "log" , "--no-graph" , "--template" , `commit_id.short() ++ "\t" ++ description.first_line() ++ "\n"` , "--revisions" , "::@" , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
3434 lines := strings .Split (string (output ), "\n " )
3535 format := "%0" + strconv .Itoa (len (strconv .Itoa (limit - 1 ))) + "d"
3636
@@ -44,7 +44,7 @@ func ActionPrevCommits(limit int) carapace.Action {
4444}
4545
4646func ActionNextCommits (limit int ) carapace.Action {
47- return carapace . ActionExecCommand ( "jj" , "log" , "--no-graph" , "--template" , `commit_id.short() ++ "\t" ++ description.first_line() ++ "\n"` , "--revisions" , "@-::" , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
47+ return actionExecJJ ( "log" , "--no-graph" , "--template" , `commit_id.short() ++ "\t" ++ description.first_line() ++ "\n"` , "--revisions" , "@-::" , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
4848 lines := strings .Split (string (output ), "\n " )
4949 format := "%0" + strconv .Itoa (len (strconv .Itoa (limit - 1 ))) + "d"
5050
@@ -62,7 +62,7 @@ func ActionNextCommits(limit int) carapace.Action {
6262// 3b61f0a729f7 (compat: added cobra bridge)
6363// 3c2e7535ce2f (elivsh: testing tag support)
6464func ActionRecentCommits (limit int ) carapace.Action {
65- return carapace . ActionExecCommand ( "jj" , "log" , "--no-graph" , "--template" , `commit_id.short() ++ "\n" ++ description.first_line() ++ "\n"` , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
65+ return actionExecJJ ( "log" , "--no-graph" , "--template" , `commit_id.short() ++ "\n" ++ description.first_line() ++ "\n"` , "--limit" , strconv .Itoa (limit ))(func (output []byte ) carapace.Action {
6666 lines := strings .Split (string (output ), "\n " )
6767 return carapace .ActionValuesDescribed (lines [:len (lines )- 1 ]... ).Style (styles .Git .Commit )
6868 }).Tag ("recent commits" )
0 commit comments