diff --git a/src/contexts/cli/cli.go b/src/contexts/cli/cli.go index d96bc845..2b2642d6 100644 --- a/src/contexts/cli/cli.go +++ b/src/contexts/cli/cli.go @@ -853,7 +853,11 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心", case "trend": // 提交记录 - m.Cmdy("nfs.git", "sum", "-n", kit.Select("20", arg, 1)) + if len(arg) == 1 { + m.Cmdy("nfs.git", "sum", "-n", 20) + } else { + m.Cmdy("nfs.git", "sum", "-n", arg[1:]) + } case "submit": // 提交代码 diff --git a/src/contexts/cli/version.go b/src/contexts/cli/version.go index 7c167a18..55f86f8a 100644 --- a/src/contexts/cli/version.go +++ b/src/contexts/cli/version.go @@ -4,5 +4,5 @@ var version = struct { host string self int }{ - "2019-09-21 18:02:29", "mac", 621, + "2019-09-21 18:43:47", "mac", 626, } diff --git a/src/contexts/nfs/nfs.go b/src/contexts/nfs/nfs.go index 68d603b3..1ebf655b 100644 --- a/src/contexts/nfs/nfs.go +++ b/src/contexts/nfs/nfs.go @@ -715,7 +715,7 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心", if m.Options("git_dir") { args = append(args, "-C", m.Option("git_dir")) } - if args = append(args, "log", "--shortstat", "--pretty=commit: %ad", "--date=iso"); len(arg) > 1 { + if args = append(args, "log", "--shortstat", "--pretty=commit: %ad %n%s", "--date=iso"); len(arg) > 1 { args = append(args, arg[1:]...) } else { args = append(args, "--reverse") @@ -723,8 +723,8 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心", if out, e := exec.Command("git", args...).CombinedOutput(); e == nil { for _, v := range strings.Split(string(out), "commit: ") { - if l := strings.Split(v, "\n"); len(l) > 2 { - fs := strings.Split(strings.TrimSpace(l[2]), ", ") + if l := strings.Split(v, "\n"); len(l) > 3 { + fs := strings.Split(strings.TrimSpace(l[3]), ", ") hs := strings.Split(l[0], " ") m.Add("append", "date", hs[0]) @@ -739,6 +739,7 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心", m.Add("append", "adds", "0") m.Add("append", "dels", adds[0]) } + m.Add("append", "note", l[1]) m.Add("append", "hour", strings.Split(hs[1], ":")[0]) m.Add("append", "time", hs[1]) } else if len(l[0]) > 0 { @@ -746,6 +747,7 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心", m.Add("append", "date", hs[0]) m.Add("append", "adds", 0) m.Add("append", "dels", 0) + m.Add("append", "note", l[1]) m.Add("append", "hour", strings.Split(hs[1], ":")[0]) m.Add("append", "time", hs[1]) }