Commit Graph

38 Commits

Author SHA1 Message Date
mrbeanc
d4009cd2cf 基本实现restore命令 2023-12-23 16:11:54 +08:00
mrbeanc
319f15cb31 fix: 修正一些路径统一问题 2023-12-23 12:45:26 +08:00
HouXiaoxuan
f944ce9182 add util::ensure_no_file 2023-12-23 10:44:49 +08:00
HouXiaoxuan
c8b45c0b83 去除setup_with_mit,使用clarm_mit代替 2023-12-23 10:44:49 +08:00
HouXiaoxuan
055dc49f52 Revert "setup_test_with_clean_mit() 会清理文件"
This reverts commit 13aa7452de.
2023-12-23 10:44:49 +08:00
HouXiaoxuan
13aa7452de setup_test_with_clean_mit() 会清理文件 2023-12-23 10:12:58 +08:00
mrbeanc
ce2251fff6 test-fix: 修正测试中的问题 2023-12-22 23:50:23 +08:00
mrbeanc
1e16179e0a restore: 实现restore_worktree() 2023-12-22 21:02:22 +08:00
mrbeanc
b9b8d9c704 fix: 修复add命令检测workdir(而非curDir)中deleted files的问题 2023-12-22 14:49:52 +08:00
mrbeanc
49a7220ad8 手动实现相对路径->绝对路径,解决add不存在文件panic问题 2023-12-22 14:39:41 +08:00
HouXiaoxuan
0ab07cc4c4 增加hash类型判断 2023-12-22 13:23:10 +08:00
HouXiaoxuan
5c439aeff2 重新format,对use进行排序 2023-12-22 09:03:51 +08:00
mrbeanc
5f1d115658 实现:status命令
TODO:add 不存在的文件报错
2023-12-22 00:11:04 +08:00
mrbeanc
d67644eb9c 新增:add命令检测file在repo外或在.mit内 2023-12-21 21:48:07 +08:00
mrbeanc
737917e421 rustfmt: max-width=120 2023-12-21 20:54:12 +08:00
mrbeanc
a2e9072951 统一format格式(rustfmt) 2023-12-21 20:44:15 +08:00
HouXiaoxuan
526210b1db 解决TODO&创建TODO 2023-12-21 19:15:43 +08:00
mrbeanc
1d6e648120 优化changes_to_be_committed() 2023-12-21 15:42:30 +08:00
mrbeanc
05101c98ef fix: 修正get_tracked_files(),不需要判断文件是否存在于磁盘 2023-12-21 15:18:23 +08:00
mrbeanc
a459a0922e fix:去除current_head()返回值中的\n
\n会导致文件写入失败
2023-12-21 14:25:40 +08:00
HouXiaoxuan
0c154163ed status 实现一半 2023-12-21 03:20:04 +08:00
HouXiaoxuan
500a1de45c 优化panic 2023-12-21 01:48:37 +08:00
HouXiaoxuan
94c2cadf72 增加测试工具函数ensure_test_file 2023-12-21 01:39:26 +08:00
HouXiaoxuan
85917e1be4 增加一个路径查找的兜底 2023-12-21 00:03:25 +08:00
HouXiaoxuan
0c82e91a4b 彩色panic信息 2023-12-20 23:25:54 +08:00
mrbeanc
162313b7bc Index:在成员函数中对传入的path进行预处理,统一路径形式(absolute) 2023-12-20 21:28:55 +08:00
mrbeanc
16ee60339d 完善Index::save逻辑 2023-12-20 18:29:48 +08:00
mrbeanc
ffac740f97 处理Windows下绝对路径转换产生的"\\\\?\\"前缀 2023-12-20 16:37:55 +08:00
mrbeanc
642f8b2cff 新增setup_test_with_clean_mit()用于获取干净的mit目录(空仓库) 2023-12-20 13:11:58 +08:00
HouXiaoxuan
9c7dee7521 heads文件操作 2023-12-20 01:45:33 +08:00
HouXiaoxuan
26f3c84535 测试路径工具 2023-12-19 22:09:01 +08:00
mrbeanc
5d7e0585bb 临时提交:add & index & blob 2023-12-19 21:03:47 +08:00
HouXiaoxuan
f8f785f78b 使用路径常量 2023-12-19 17:25:08 +08:00
HouXiaoxuan
70f1d1dbc1 使用Pathbuf代替String 2023-12-19 17:24:11 +08:00
mrbeanc
247347a76e 初步编写add逻辑;新增终端颜色库 2023-12-19 13:49:27 +08:00
mrbeanc
af5e36c24c 更名文件夹objects->models,并增添index.rs结构 2023-12-18 13:42:29 +08:00
HouXiaoxuan
a0059d1c9c check storage 2023-12-18 00:42:18 +08:00
mrbeanc
e5141c159b 初步搭建代码框架 包括objects, tests, utils 2023-12-16 18:37:29 +08:00