Conversation
js00070
reviewed
Dec 9, 2020
| @1. ����value����洢�����Ӷ�Ӧ��key-value | ||
| step1 �ڹ������½�һ��file����д���ļ����ݣ�����̨���롢������д��һ�����е��ļ��� | ||
| step2 Ϊ���file����������Ϊ���ļ���hashֵ�������� | ||
| /* 任务一的理解:主要是针对blob对象 |
There was a problem hiding this comment.
其实Tree对象也是一样,也是通过key-value接口进行读写的,Tree和Blob本质上没什么不同,都是有自己的value值,然后value的哈希值作为key,只是Blob和Tree的value的具体含义不一样
js00070
reviewed
Dec 9, 2020
| } | ||
| } | ||
|
|
||
| public static void getValue(String path, String encoding) throws IOException { |
Collaborator
Author
There was a problem hiding this comment.
代码逻辑的拆分有改进空间,最好是拆分出一个类,专门做key-value的get、set接口,文件的读写代码全部封装在这个类里
明白学长的意思!今晚会再做修改。
|
代码逻辑的拆分有改进空间,最好是拆分出一个类,专门做key-value的get、set接口,文件的读写代码全部封装在这个类里 |
|
主分支似乎得git reset然后git push -f一下,这样才不会有冲突 |
Collaborator
Author
感谢学长指点解决方案! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
之前的代码被误操作merge了,这是新的提交@js00070 恳请学长指正!
JAVA课程项目_简单版本控制工具项目_第一阶段任务的代码:
文件夹中包含三个类:Hash类,Blob类,Test类。第二阶段任务将补充Tree类,用于实现将一个文件夹转化为key的工作。
①Hash类用于提供生成文件或文件夹或字符串对应key值的方法。
②Blob类用于生成blob对象,主要提供为存储中添加key-value的方法。
③Test类用于单元测试,提供给定key值找到对应value值的方法。