Re: [PATCH v2] builtin/remote.c: show progress when renaming remote references
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 3, 2022, 11:04 UTC
- Message-ID
- <220303.86y21r47oh.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <dc63ec91ab24eb24a276de074138745fa061eba1.1646261969.git.me@ttaylorr.com>
On Wed, Mar 02 2022, Taylor Blau wrote:
Show 8 quoted lines
> @@ -753,8 +753,9 @@ test_expect_success 'rename a remote' ' > ( > cd four && > git config branch.main.pushRemote origin && > - git remote rename origin upstream && > + GIT_PROGRESS_DELAY=0 git remote -v rename origin upstream 2>err && > grep "pushRemote" .git/config && > + grep "Renaming remote references: 100% (4/4), done" err &&
Just on this part. You can use some variant of "test_region" to do this with trace2:
git grep -C10 TRACE.*progress -- t
Which as an improvement also tests that you called stop_progress(), i.e. that the trace2 region is ended.
> test -z "$(git for-each-ref refs/remotes/origin)" && > test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/main" && > test "$(git rev-parse upstream/main)" = "$(git rev-parse main)" &&