1 Star 0 Fork 34

pjgg/git-repo-clean

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fastimport.go 608 Bytes
一键复制 编辑 原始数据 按行查看 历史
Li Linchao 提交于 2021-11-23 11:47 . fast-import: drop --date-format option
package main
import (
"io"
"os"
"os/exec"
)
// run a git-fast-export process
// but keep repo path the same with git-fast-export
// return a Writer for stream pipeline to feed data into this process
func (repo *Repository) FastImportOut() (io.WriteCloser, *exec.Cmd, error) {
args := []string{
"-c",
"core.ignorecase=false",
"fast-import",
"--quiet",
"--force",
// "--date-format=raw-permissive", // 2.28.0
}
cmd := repo.GitCommand(args...)
in, err := cmd.StdinPipe()
if err != nil {
in.Close()
return nil, nil, err
}
cmd.Stderr = os.Stderr
cmd.Start()
return in, cmd, nil
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/pengjuweb/git-repo-clean.git
git@gitee.com:pengjuweb/git-repo-clean.git
pengjuweb
git-repo-clean
git-repo-clean
main

搜索帮助