Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ gih pull # Done! All repositories updated in parallel
It is just a tool to do this. It does nothing else.
I created it because I was tired of managing dozens of microservice repositories for the projects I work on.

### Output

`gih` streams one completion line per repository as work finishes, then
prints a bordered summary table with totals at the end:

```
==> Running pull origin master on 3 repositories
✓ takecy/git-here Already up to date. 0.4s
✗ takecy/adk-test fatal: couldn't find remote ref master 1.2s
✓ takecy/another-repo Already up to date. 0.5s
==> Summary
+-------------------------+--------+----------+----------------------------------------+
| Repository | Status | Duration | Message |
+-------------------------+--------+----------+----------------------------------------+
| takecy/git-here | ✓ | 0.4s | Already up to date. |
| takecy/adk-test | ✗ | 1.2s | fatal: couldn't find remote ref master |
| takecy/another-repo | ✓ | 0.5s | Already up to date. |
+-------------------------+--------+----------+----------------------------------------+
Total: 3 Success: 2 Failed: 1 Timeout: 0 Elapsed: 1.2s
```

Failed rows are colored red and timed-out rows yellow when the output
target is a terminal.


## Table of Contents

Expand Down
5 changes: 2 additions & 3 deletions gih/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func main() {
fmt.Printf("args: targetDir: %s ignoreDir: %s concurrency: %d timeout: %v\n", *targetDir, *ignoreDir, *conNum, *timeout)

writer := os.Stdout
errWriter := os.Stderr

summary, err := (&syncer.Sync{
TargetDir: *targetDir,
Expand All @@ -75,8 +74,8 @@ func main() {
Command: flag.Arg(0),
Options: flag.Args()[1:],
ConNum: *conNum,
Gitter: syncer.NewGitter(writer, errWriter),
Writer: printer.NewPrinter(writer, errWriter),
Gitter: syncer.NewGitter(writer, os.Stderr),
Writer: printer.NewPrinter(writer),
}).Run()

// Map run outcome to exit codes per README spec:
Expand Down
Loading
Loading