minor fixes
This commit is contained in:
parent
4affce9f0f
commit
1edc5ec7cd
|
|
@ -34,5 +34,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT basic-vcs)
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT basic-vcs)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
target_link_libraries(basic-vcs PRIVATE curl)
|
||||||
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -122,6 +122,8 @@ int commitTree(int argc, const char** argv)
|
||||||
SHA1 checksum;
|
SHA1 checksum;
|
||||||
checksum.update(commitObject);
|
checksum.update(commitObject);
|
||||||
const std::string hash = checksum.final();
|
const std::string hash = checksum.final();
|
||||||
|
std::cout << hash << "\n";
|
||||||
|
|
||||||
const std::filesystem::path hashDir{ std::filesystem::current_path() / ".git" / "objects" / hash.substr(0,2) };
|
const std::filesystem::path hashDir{ std::filesystem::current_path() / ".git" / "objects" / hash.substr(0,2) };
|
||||||
const std::filesystem::path objectFullPath{ hashDir / hash.substr(2) };
|
const std::filesystem::path objectFullPath{ hashDir / hash.substr(2) };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue