From 6e95cddb80399429569a02c29479cb96175f0291 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 29 Mar 2025 13:56:36 +0000 Subject: [PATCH] copy: progress: Add a comment about size and pipes I think this is a bug of sorts, although the progress_bar subfunctions happen to handle it fine. Add a comment so I remember to do something about this later. (cherry picked from commit 363437af152d037b909de6b1ef7f91da921e073c) --- copy/progress.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/copy/progress.c b/copy/progress.c index cc0910d6..3c010320 100644 --- a/copy/progress.c +++ b/copy/progress.c @@ -100,6 +100,11 @@ progress_bar (off_t pos, int64_t size) if (size == 0) return; + /* XXX Synchronous mode, when the source is a pipe, passes size == + * -1 here. We should deal with this by displaying some sort of + * spinner. + */ + pthread_mutex_lock (&lock); if (progress_fd == -1) do_progress_bar (pos, size); -- 2.47.1