mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-26 17:24:05 +08:00
opt nfs.git.sum
This commit is contained in:
parent
ac2a42a6fd
commit
447dba33c2
@ -853,7 +853,11 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心",
|
|||||||
|
|
||||||
case "trend":
|
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":
|
case "submit":
|
||||||
// 提交代码
|
// 提交代码
|
||||||
|
@ -4,5 +4,5 @@ var version = struct {
|
|||||||
host string
|
host string
|
||||||
self int
|
self int
|
||||||
}{
|
}{
|
||||||
"2019-09-21 18:02:29", "mac", 621,
|
"2019-09-21 18:43:47", "mac", 626,
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心",
|
|||||||
if m.Options("git_dir") {
|
if m.Options("git_dir") {
|
||||||
args = append(args, "-C", m.Option("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:]...)
|
args = append(args, arg[1:]...)
|
||||||
} else {
|
} else {
|
||||||
args = append(args, "--reverse")
|
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 {
|
if out, e := exec.Command("git", args...).CombinedOutput(); e == nil {
|
||||||
for _, v := range strings.Split(string(out), "commit: ") {
|
for _, v := range strings.Split(string(out), "commit: ") {
|
||||||
if l := strings.Split(v, "\n"); len(l) > 2 {
|
if l := strings.Split(v, "\n"); len(l) > 3 {
|
||||||
fs := strings.Split(strings.TrimSpace(l[2]), ", ")
|
fs := strings.Split(strings.TrimSpace(l[3]), ", ")
|
||||||
hs := strings.Split(l[0], " ")
|
hs := strings.Split(l[0], " ")
|
||||||
m.Add("append", "date", hs[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", "adds", "0")
|
||||||
m.Add("append", "dels", 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", "hour", strings.Split(hs[1], ":")[0])
|
||||||
m.Add("append", "time", hs[1])
|
m.Add("append", "time", hs[1])
|
||||||
} else if len(l[0]) > 0 {
|
} 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", "date", hs[0])
|
||||||
m.Add("append", "adds", 0)
|
m.Add("append", "adds", 0)
|
||||||
m.Add("append", "dels", 0)
|
m.Add("append", "dels", 0)
|
||||||
|
m.Add("append", "note", l[1])
|
||||||
m.Add("append", "hour", strings.Split(hs[1], ":")[0])
|
m.Add("append", "hour", strings.Split(hs[1], ":")[0])
|
||||||
m.Add("append", "time", hs[1])
|
m.Add("append", "time", hs[1])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user