From: Junio C Hamano Date: Tue, 21 Jan 2025 16:44:54 +0000 (-0800) Subject: Merge branch 'ps/the-repository' X-Git-Tag: v2.49.0-rc0~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b39a128c814a2362d0533c7df0ab7a2fef6fa4b;p=thirdparty%2Fgit.git Merge branch 'ps/the-repository' More code paths have a repository passed through the callchain, instead of assuming the primary the_repository object. * ps/the-repository: match-trees: stop using `the_repository` graph: stop using `the_repository` add-interactive: stop using `the_repository` tmp-objdir: stop using `the_repository` resolve-undo: stop using `the_repository` credential: stop using `the_repository` mailinfo: stop using `the_repository` diagnose: stop using `the_repository` server-info: stop using `the_repository` send-pack: stop using `the_repository` serve: stop using `the_repository` trace: stop using `the_repository` pager: stop using `the_repository` progress: stop using `the_repository` --- 7b39a128c814a2362d0533c7df0ab7a2fef6fa4b diff --cc builtin/log.c index a4f41aafca,3a6a3362f3..e41f88945e --- a/builtin/log.c +++ b/builtin/log.c @@@ -2498,15 -2495,13 +2498,16 @@@ int cmd_format_patch(int argc rev.add_signoff = cfg.do_signoff; if (show_progress) - progress = start_delayed_progress(_("Generating patches"), total); + progress = start_delayed_progress(the_repository, + _("Generating patches"), total); - while (0 <= --nr) { + for (i = 0; i < nr; i++) { + size_t idx = nr - i - 1; int shown; - display_progress(progress, total - nr); - commit = list[nr]; - rev.nr = total - nr + (start_number - 1); + + display_progress(progress, total - idx); + commit = list[idx]; + rev.nr = total - idx + (start_number - 1); + /* Make the second and subsequent mails replies to the first */ if (cfg.thread) { /* Have we already had a message ID? */