Commit 79dd2ef
committed
color: introduce support for colorizing stderr
So far, we only ever asked whether stdout wants to be colorful. In the
upcoming patches, we will want to make push errors more prominent, which
are printed to stderr, though.
So let's refactor the want_color() function into a want_color_fd()
function (which expects to be called with fd == 1 or fd == 2 for stdout
and stderr, respectively), and then define the macro `want_color()` to
use the want_color_fd() function.
And then also add a macro `want_color_stderr()`, for convenience and
for documentation.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 8a8c948 commit 79dd2ef
2 files changed
+14
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | | - | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| |||
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
342 | | - | |
| 344 | + | |
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
348 | | - | |
349 | | - | |
350 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
0 commit comments