From: Junio C Hamano Date: Thu, 24 Mar 2011 23:35:37 GMT Subject: Re: [PATCH 3/4] show: turn on rename detection progress reporting Message-ID: <7vzkok6qie.fsf@alter.siamese.dyndns.org> In-Reply-To: <20110324174916.GC30685@sigill.intra.peff.net> Jeff King writes: > while ((commit = get_revision(rev)) != NULL) { > - if (!log_tree_commit(rev, commit) && > + int showed = log_tree_commit(rev, commit); > + if (showed && > rev->max_count >= 0) > /* > * We decremented max_count in get_revision, > * but we didn't actually show the commit. > */ > rev->max_count++; > + /* Once we have output, progress will clutter the terminal. */ > + if (showed) > + rev->diffopt.show_rename_progress = 0; After looking at the implementation of log_tree_commit(), shouldn't this part be more like this? int shown = log_tree_commit(rev, commit); if (!shown && rev->max_count >=0) rev->max_count++; if (shown) rev->diffopt.show_rename_progress = 0;