feat: 新增 git retime,把指定日期范围的提交时间改到 21:00-23:00 并强推
- 保留每个提交的原日期,只重排时分秒到 21:00-23:00;同日严格递增, 间隔 5-40 分钟且秒位随机;窗口不足时自动压紧并在预览中标注 - 支持 --window/--since/--until、--interval(含 match-remote)、--seed、 --remote、--branch、--no-push - 安全措施:默认只预览(退出码 2)、脏工作区拒绝、改写前创建 refs/kopsc-backup/<分支>-<时间戳> 备份、推送前比对 tree 哈希、 只用 --force-with-lease - BuiltinRequest 增加 Confirmed,使内置命令能获知 CLI 已确认 --yes - 文档:新增 README.git.md,主 README 补充导航与示例
This commit is contained in:
@@ -23,6 +23,9 @@ type Options struct {
|
||||
Stderr io.Writer
|
||||
Env []string // optional override of the child environment
|
||||
Dir string // optional working directory
|
||||
// Confirmed reports that the caller already approved a destructive
|
||||
// command (--yes); builtins that would otherwise ask again check it.
|
||||
Confirmed bool
|
||||
}
|
||||
|
||||
// Plan is a resolved variant plus arguments forwarded from the caller.
|
||||
@@ -117,8 +120,9 @@ func (p Plan) Run(ctx context.Context, opts Options) error {
|
||||
Stdin: opts.Stdin,
|
||||
Stdout: opts.Stdout,
|
||||
Stderr: opts.Stderr,
|
||||
Info: p.Result.Info,
|
||||
Plan: p,
|
||||
Info: p.Result.Info,
|
||||
Plan: p,
|
||||
Confirmed: opts.Confirmed,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user