In-place progress output in the terminal or console In-place progress output in the terminal or console unix unix

In-place progress output in the terminal or console


Use carriage return. '\r' should usually work.


git/progress.c

...        eol = done ? done : "   \r";...                fprintf(stderr, "...%s", ..., eol);                fflush(stderr);

Git simply emits a carriage return and no line feed, which the terminal interprets as "move to first column".