Commit Graph

19 Commits

Author SHA1 Message Date
mrbeanc
82ae9c90c5 fix: switch-test 2024-01-02 11:28:42 +08:00
mrbeanc
3221130833 允许有未跟踪文件情况下,切换分支 2024-01-02 00:28:15 +08:00
HouXiaoxuan
f88ab0e33a 修改Blob逻辑,主要变更为 Blob 与 objects文件解构。store作为与objects文件交互的唯一依赖。具体为:
1. Blob使用Content新建而不是path
2. workdir的读写能力由util::read|write workfile提供
3. 判断文件是否更改不直接计算hash,经由新建一个不保存的Blob进行。现在Hash算法只由Store决定。
2023-12-28 22:25:54 +08:00
HouXiaoxuan
cdc289b3bb 拆分util文件 2023-12-28 18:52:30 +08:00
HouXiaoxuan
7b1e344d32 优化switch报错 2023-12-28 15:35:28 +08:00
HouXiaoxuan
511a3d6c6e 将test的util函数移动到test宏下,去除unused警告 2023-12-28 15:03:15 +08:00
HouXiaoxuan
6d697e3e74 删除lib.rs,调整文件结构 2023-12-28 15:02:14 +08:00
mrbeanc
dc0a3138ad 优化import导入和mod导出,简化使用 2023-12-26 14:59:06 +08:00
HouXiaoxuan
b918290c79 add test(part) 2023-12-23 22:16:27 +08:00
mrbeanc
c975d02ef0 fix: 修正restore_index()行为,从index筛选文件而非工作区 2023-12-23 17:48:11 +08:00
HouXiaoxuan
8c68032c0e switch_test清空 2023-12-23 17:43:08 +08:00
HouXiaoxuan
b67fde9381 all test pass 2023-12-23 10:44:49 +08:00
HouXiaoxuan
fd7a2e38a7 switch test(暂时无法运行) 2023-12-23 10:13:18 +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
HouXiaoxuan
451dbd9d01 去除不必要参数 2023-12-22 13:24:10 +08:00
HouXiaoxuan
0ab07cc4c4 增加hash类型判断 2023-12-22 13:23:10 +08:00
HouXiaoxuan
05368f67b6 switch的基本代码框架 2023-12-22 11:07:28 +08:00
HouXiaoxuan
b0172211a0 使用switch+restore替代checkout 2023-12-22 03:34:58 +08:00