Ai
20 Star 43 Fork 13

GiteeStudio/git-analyze

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
driver.cc 686 Bytes
一键复制 编辑 原始数据 按行查看 历史
江二十三 提交于 2019-03-29 16:52 +08:00 . [update] use cmd_main
//////////////
#include "executor.hpp"
#include "os.hpp"
/*update hook*/
bool RulesFile(std::string &rf) {
if (!os::Executable(rf)) {
fprintf(stderr, "unable lookup exe dir\n");
return false;
}
os::PathRemoveFileSpec(rf);
rf.push_back(os::PathSeparator);
rf.append("rw.json");
return true;
}
// update ref-name oldrev newrev
int cmd_main(int argc, char **argv) {
if (argc < 4) {
fprintf(stderr, "BAD argv\n");
return 1;
}
std::string rf;
if (!RulesFile(rf)) {
return 1;
}
Executor e;
if (!e.InitializeRules(rf, argv[1])) {
return 1;
}
if (!e.Execute(os::Getwd(), argv[2], argv[3])) {
///// BAD
return 1;
}
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/oscstudio/git-analyze.git
git@gitee.com:oscstudio/git-analyze.git
oscstudio
git-analyze
git-analyze
master

搜索帮助