Read a blob object

Create a blob object

Read a tree object

Write a tree object

Create a commit

Clone a repository

log
[compile] -- Running vcpkg install
[compile] Detecting compiler hash for triplet x64-linux...
[compile] Compiler found: /usr/local/bin/c++
[compile] The following packages are already installed:
[compile] curl[core,non-http,openssl,ssl]:x64-linux@8.7.1#2 -- git+https://github.com/microsoft/vcpkg@b72d99e7315d0669d227580f056f7d4ea7303a58
[compile] * openssl:x64-linux@3.3.0 -- git+https://github.com/microsoft/vcpkg@033278114ce1aff68a03a777df0689c846760006
[compile] * vcpkg-cmake:x64-linux@2023-05-04 -- git+https://github.com/microsoft/vcpkg@88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a
[compile] * vcpkg-cmake-config:x64-linux@2022-02-06#1 -- git+https://github.com/microsoft/vcpkg@8d54cc4f487d51b655abec5f9c9c3f86ca83311f
[compile] * vcpkg-cmake-get-vars:x64-linux@2023-12-31 -- git+https://github.com/microsoft/vcpkg@725c841810ceb8de33da68ea879eb8f0b4d6c94c
[compile] * zlib:x64-linux@1.3.1 -- git+https://github.com/microsoft/vcpkg@3f05e04b9aededb96786a911a16193cdb711f0c9
[compile] All requested installations completed successfully in: 83.2 us
[compile] -- Running vcpkg install - done
[compile] -- Found OpenSSL: /app/build/vcpkg_installed/x64-linux/debug/lib/libcrypto.a (found version "3.3.0")
[compile] -- Found ZLIB: /app/build/vcpkg_installed/x64-linux/lib/libz.a (found version "1.3.1")
[compile] -- Found OpenSSL: /app/build/vcpkg_installed/x64-linux/debug/lib/libcrypto.a (found suitable version "3.3.0", minimum required is "3")
[compile] -- Found ZLIB: /app/build/vcpkg_installed/x64-linux/lib/libz.a (found suitable version "1.3.1", minimum required is "1")
[compile] -- Configuring done (0.7s)
[compile] -- Generating done (0.0s)
[compile] -- Build files have been written to: /app/build
[compile] [ 50%] Building CXX object CMakeFiles/git.dir/src/main.cpp.o
[compile] [100%] Linking CXX executable git
[compile] [100%] Built target git
[compile] Moved ./.codecrafters/run.sh → ./your_program.sh
[compile] Compilation successful.
[tester::#MG6] Running tests for Stage #MG6 (Clone a repository)
[tester::#MG6] $ ./your_program.sh clone https://github.com/codecrafters-io/git-sample-3 <testDir>
[your_program] Logs from your program will appear here!
[tester::#MG6] $ git cat-file commit 23f0bc3b5c7c3108e41c448f01a3db31e7064bbb
[tester::#MG6] Commit contents verified
[tester::#MG6] File contents verified
[tester::#MG6] Test passed.
[tester::#JM9] Running tests for Stage #JM9 (Create a commit)
[tester::#JM9] $ ./your_program.sh commit-tree <tree_sha> -p <commit_sha> -m <message>
[your_program] Logs from your program will appear here!
[your_program] a4a8fe43c154632696f81d56899d4d05359e2f7e
[tester::#JM9] Test passed.
[tester::#FE4] Running tests for Stage #FE4 (Write a tree object)
[tester::#FE4] $ ./your_program.sh init
[your_program] Logs from your program will appear here!
[your_program] Initialized git directory
[tester::#FE4] Creating some files & directories
[tester::#FE4] $ ./your_program.sh write-tree
[your_program] Logs from your program will appear here!
[your_program] 0942295dda13b896ce18507abd2dc54f4745415d
[tester::#FE4] Found git object file written at .git/objects/09/42295dda13b896ce18507abd2dc54f4745415d.
[tester::#FE4] $ git ls-tree --name-only 0942295dda13b896ce18507abd2dc54f4745415d
[tester::#FE4] Test passed.
[tester::#KP1] Running tests for Stage #KP1 (Read a tree object)
[tester::#KP1] $ ./your_program.sh init
[your_program] Logs from your program will appear here!
[your_program] Initialized git directory
[tester::#KP1] $ ./your_program.sh ls-tree --name-only c7a10ac6e58a25a5e76a070d75b821ad039ccfb7
[your_program] Logs from your program will appear here!
[your_program] apple
[your_program] blueberry
[your_program] pear
[tester::#KP1] Test passed.
[tester::#JT4] Running tests for Stage #JT4 (Create a blob object)
[tester::#JT4] $ ./your_program.sh init
[your_program] Logs from your program will appear here!
[your_program] Initialized git directory
[tester::#JT4] $ echo "strawberry mango pineapple blueberry banana raspberry" > blueberry.txt
[tester::#JT4] $ ./your_program.sh hash-object -w blueberry.txt
[your_program] Logs from your program will appear here!
[your_program] 7aa7154e040dbd9d43a09704f457f804f76987cd
[tester::#JT4] Output is a 40-char SHA.
[tester::#JT4] Blob file contents are valid.
[tester::#JT4] Returned SHA matches expected SHA.
[tester::#JT4] Test passed.
[tester::#IC4] Running tests for Stage #IC4 (Read a blob object)
[tester::#IC4] $ ./your_program.sh init
[your_program] Logs from your program will appear here!
[your_program] Initialized git directory
[tester::#IC4] Added blob object to .git/objects: a0c91f81b755bf0e94ed2e2bf25e8c0b366d421c
[tester::#IC4] $ ./your_program.sh cat-file -p a0c91f81b755bf0e94ed2e2bf25e8c0b366d421c
[your_program] Logs from your program will appear here!
[your_program] banana pineapple raspberry apple mango strawberry
[tester::#IC4] Output is valid.
[tester::#IC4] Test passed.
[tester::#GG4] Running tests for Stage #GG4 (Initialize the .git directory)
[tester::#GG4] $ ./your_program.sh init
[your_program] Initialized git directory
[your_program] Logs from your program will appear here!
[tester::#GG4] .git directory found.
[tester::#GG4] .git/objects directory found.
[tester::#GG4] .git/refs directory found.
[tester::#GG4] .git/HEAD file is valid.
[tester::#GG4] Test passed.
喜欢这篇文章的人也看了
评论
隐私政策
0/500
滚动到此处加载评论...



