Commit Graph

120 Commits

Author SHA1 Message Date
mrbeanc
028a044ad5 fix: is_dir依赖文件存在性,在restore中删除使用 2023-12-23 18:25:23 +08:00
HouXiaoxuan
a8977c8e33 merge test 2023-12-23 17:56:51 +08:00
mrbeanc
c975d02ef0 fix: 修正restore_index()行为,从index筛选文件而非工作区 2023-12-23 17:48:11 +08:00
HouXiaoxuan
01206ac88e format影响 2023-12-23 17:43:16 +08:00
HouXiaoxuan
8c68032c0e switch_test清空 2023-12-23 17:43:08 +08:00
mrbeanc
d4009cd2cf 基本实现restore命令 2023-12-23 16:11:54 +08:00
HouXiaoxuan
282b3556d1 tree生成该用index参数 2023-12-23 16:01:18 +08:00
HouXiaoxuan
174e139508 增加clran检查 2023-12-23 15:49:01 +08:00
HouXiaoxuan
04b82f1aa6 merge ff 未测试 2023-12-23 15:43:05 +08:00
mrbeanc
41a17634b7 fix: 重构restore_worktree()逻辑,正确恢复dir中[已删除文件] 2023-12-23 12:52:21 +08:00
mrbeanc
319f15cb31 fix: 修正一些路径统一问题 2023-12-23 12:45:26 +08:00
HouXiaoxuan
b67fde9381 all test pass 2023-12-23 10:44:49 +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
mrbeanc
f8da30b7d8 test-fix: test_commit() & test_read() 2023-12-23 10:40:11 +08:00
HouXiaoxuan
fd7a2e38a7 switch test(暂时无法运行) 2023-12-23 10:13:18 +08:00
HouXiaoxuan
13aa7452de setup_test_with_clean_mit() 会清理文件 2023-12-23 10:12:58 +08:00
HouXiaoxuan
90013cfce9 TODO 2023-12-23 08:20:52 +08:00
mrbeanc
7f21286e66 todo 2023-12-23 00:50:21 +08:00
mrbeanc
6d6fdd8bf2 fix: restore_worktree()路径问题 2023-12-23 00:37:41 +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
d719cc43da fix: 修复restore命令中,staged & source短名称冲突问题 2023-12-22 21:00:39 +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
451dbd9d01 去除不必要参数 2023-12-22 13:24:10 +08:00
HouXiaoxuan
0ab07cc4c4 增加hash类型判断 2023-12-22 13:23:10 +08:00
HouXiaoxuan
7b91fad41f fix type error 2023-12-22 11:08:26 +08:00
HouXiaoxuan
fd415fe02b restore的基本代码框架 2023-12-22 11:07:36 +08:00
HouXiaoxuan
05368f67b6 switch的基本代码框架 2023-12-22 11:07:28 +08:00
HouXiaoxuan
9fc8948cf7 对switch的设计和理解 2023-12-22 09:57:07 +08:00
HouXiaoxuan
0688ffc46c 对restore的理解和实验 2023-12-22 09:41:53 +08:00
HouXiaoxuan
5c439aeff2 重新format,对use进行排序 2023-12-22 09:03:51 +08:00
HouXiaoxuan
758cc334eb format use rustfmt nightly 2023-12-22 08:41:56 +08:00
HouXiaoxuan
80ab4c1052 清除警告 2023-12-22 03:38:04 +08:00
HouXiaoxuan
b0172211a0 使用switch+restore替代checkout 2023-12-22 03:34:58 +08:00
HouXiaoxuan
f48585a380 update readme 2023-12-22 02:10:06 +08:00
HouXiaoxuan
5fb6667914 使用共用的no_change函数 2023-12-22 01:53:05 +08:00
HouXiaoxuan
c61cc619ef git branch实现&测试,show类型需要结合checkout测试 2023-12-22 01:49:55 +08:00
HouXiaoxuan
df39d1e71b store 搜索能力 2023-12-22 01:49:55 +08:00
mrbeanc
5f1d115658 实现:status命令
TODO:add 不存在的文件报错
2023-12-22 00:11:04 +08:00
HouXiaoxuan
f9e7ef493a git log实现与测试 2023-12-21 23:01:49 +08:00
HouXiaoxuan
a8707149a9 优化commit第一次提交,parent为空而不是“” 2023-12-21 23:01:49 +08:00
HouXiaoxuan
2a04d7454b mv rustfmt.toml 2023-12-21 23:01:13 +08:00
HouXiaoxuan
d116f4b2ff 精简优化 2023-12-21 23:01:13 +08:00
HouXiaoxuan
83f3f3890c commit 增加时间戳 2023-12-21 23:01:13 +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