]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ab/only-single-progress-at-once'
authorJunio C Hamano <gitster@pobox.com>
Fri, 25 Feb 2022 23:47:35 +0000 (15:47 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Feb 2022 23:47:35 +0000 (15:47 -0800)
Further tweaks on progress API.

* ab/only-single-progress-at-once:
  pack-bitmap-write.c: don't return without stop_progress()
  progress API: unify stop_progress{,_msg}(), fix trace2 bug
  progress.c: refactor stop_progress{,_msg}() to use helpers
  progress.c: use dereferenced "progress" variable, not "(*p_progress)"
  progress.h: format and be consistent with progress.c naming
  progress.c tests: test some invalid usage
  progress.c tests: make start/stop commands on stdin
  progress.c test helper: add missing braces
  leak tests: fix a memory leak in "test-progress" helper

1  2 
pack-bitmap-write.c
t/t5316-pack-delta-depth.sh

Simple merge
index df524f7b6dde1fa63d268bb88730dc766a003f4d,bbe2e69c758d136ebc93bae8c2d5f3460435cf86..e9045009a1105d09caaea43b830548f77707b096
@@@ -57,14 -57,15 +57,18 @@@ test_expect_success 'create series of p
                git commit -m $i &&
                cur=$(git rev-parse HEAD^{tree}) &&
                {
 -                      test -n "$prev" && echo "-$prev"
 -                      echo $cur
 +                      if test -n "$prev"
 +                      then
 +                              echo "-$prev"
 +                      fi &&
 +                      echo $cur &&
                        echo "$(git rev-parse :file) file"
                } | git pack-objects --stdout >tmp &&
-               git index-pack --stdin --fix-thin <tmp || return 1
+               GIT_TRACE2_EVENT=$PWD/trace \
+               git index-pack -v --stdin --fix-thin <tmp || return 1 &&
+               grep -c region_enter.*progress trace >enter &&
+               grep -c region_leave.*progress trace >leave &&
+               test_cmp enter leave &&
                prev=$cur
        done
  '