Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 9b1e811

Browse files
committed
Minor updates
1 parent d99c97e commit 9b1e811

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ $ ./build/samples/print_tags ext/libgit2
460460

461461
### Inspect Repository Objects (`git cat-file`)
462462

463-
Here's a ~125 line simplified implementation of `git cat-file` with `cppgit2`
463+
Here's a simplified implementation of `git cat-file` with `cppgit2`
464464

465465
```cpp
466466
#include <cppgit2/repository.hpp>
@@ -482,11 +482,8 @@ void print_signature(const std::string &header, const signature &sig) {
482482
auto hours = offset / 60;
483483
auto minutes = offset % 60;
484484

485-
std::cout << header << " "
486-
<< sig.name() << " "
487-
<< "<" << sig.email() << "> "
488-
<< sig.time() << " "
489-
<< sign;
485+
std::cout << header << " " << sig.name() << " " << "<" << sig.email() << "> "
486+
<< sig.time() << " " << sign;
490487
std::cout << std::setfill('0') << std::setw(2) << hours;
491488
std::cout << std::setfill('0') << std::setw(2) << minutes << std::endl;
492489
}
@@ -591,7 +588,7 @@ int main(int argc, char **argv) {
591588
592589
Running this sample on one of the `libgit2` commits yields the following:
593590
594-
```bash
591+
```
595592
$ ./cat_file -p 01a8340662749943f3917505dc8ca65006495bec
596593
tree 83d9bef2675178eeb3aa61d17e5c8b0f7b0ec1de
597594
parent 76b49caf6a208e44d19c84caa6d42389f0de6194
@@ -608,9 +605,7 @@ Docker itself. Instead, this exception is thrown by gosu(1), which is a
608605
Go-based utility to drop privileges and run by our entrypoint.
609606

610607
Fix the issue by dropping gosu(1) in favor of sudo(1).
611-
```
612608

613-
```bash
614609
$ ./cat_file -p 83d9bef2675178eeb3aa61d17e5c8b0f7b0ec1de
615610
100644 blob fd8430bc864cfcd5f10e5590f8a447e01b942bfe .HEADER
616611
100644 blob 34c5e9234ec18c69a16828dbc9633a95f0253fe9 .editorconfig
@@ -637,9 +632,7 @@ $ ./cat_file -p 83d9bef2675178eeb3aa61d17e5c8b0f7b0ec1de
637632
040000 tree 97afcc9b6e4ca91001aadf8a3414d043f22918cf script
638633
040000 tree a08bd8a57d619b736ad2c300614b36ead8d0a333 src
639634
040000 tree dcf5925f8bbda8062ef26ca427c5110868a7f041 tests
640-
```
641635

642-
```bash
643636
$ ./cat_file -s 8765a97b5b120259dd59262865ce166f382c0f9e
644637
11957
645638
```

0 commit comments

Comments
 (0)