Output, colour and glyphs
The format has not changed since 1.0, and colour is never the only thing carrying information.
The per repository header
Each repository is introduced by a header framed with 80 = characters, carrying the directory name and the current branch. A detached HEAD shows the short commit instead.
================================================================================
📂 Folder: web-console │ Branch: main
================================================================================
M src/main.rs
-q / --quiet drops the header and leaves git's own output, with a blank line still separating the repositories.
Compare with and without --quiet: mgit --quiet
The summary
When any repository failed, a summary is printed before mgit exits. --summary prints it every time.
────────────────────────────────────────────────────────────────────────────────
mgit: 6 repositories, 5 succeeded, 1 failed
✗ web-console (exit code 128)
stdout and stderr
This is what makes mgit safe to put in a script: the summary goes to stderr by default and never pollutes stdout. mgit status -s > status.txt gives you clean data, and failures are still visible.
| What | Goes to |
|---|---|
| The per repository header | stdout |
| git's own output | wherever git writes it; mgit does not intercept it |
| The summary printed after a failure | stderr |
The summary requested with --summary | stdout |
| The warnings about missing or unreadable directories | stderr |
The paths printed by --list | stdout |
Redirect it, then read the file back: mgit --summary > status.txt
Colour
Colour only appears when the output is attached to a terminal that supports it. The precedence is: the command line, then MGIT_*, then CLICOLOR_FORCE, then NO_COLOR / CLICOLOR, then terminal detection.
| Situation | Result |
|---|---|
| Output redirected to a file or a pipe | colour is off |
NO_COLOR set to a non empty value | colour is off (no-color.org) |
CLICOLOR_FORCE set to something other than 0 | colour is on |
--color=always | always on, overriding everything above |
--color=never, --no-color | always off, overriding everything above |
Try NO_COLOR: NO_COLOR=1 mgit --summary
Glyphs and the ASCII fallback
The default glyphs are 📂, │, ✗ and ─. When the terminal cannot render them, mgit switches to plain ASCII: Folder: … | Branch: …, x and -.
- A Windows console whose output code page is not UTF-8 gets ASCII automatically.
- A POSIX locale that is not UTF-8 (
LANG=C,LC_ALL=POSIX) gets ASCII automatically. --asciiforces ASCII,MGIT_ASCII=1does the same, andMGIT_ASCII=0forces the Unicode glyphs back.