]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/bundle-progress'
authorJunio C Hamano <gitster@pobox.com>
Sun, 19 Mar 2023 22:03:11 +0000 (15:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 19 Mar 2023 22:03:11 +0000 (15:03 -0700)
Simplify UI to control progress meter given by "git bundle" command.

* jk/bundle-progress:
  bundle: turn on --all-progress-implied by default

1  2 
t/t6020-bundle-misc.sh

index 7d40994991e423a21ae384010c00b5eb71c64502,6b905e1b836d113fe03b6801b708d3e18db48eb9..8c7b25a281751ef510497a9f662bd1652125cfc3
@@@ -566,44 -567,16 +567,56 @@@ test_expect_success 'cloning from filte
        grep "cannot clone from filtered bundle" err
  '
  
 +test_expect_success 'verify catches unreachable, broken prerequisites' '
 +      test_when_finished rm -rf clone-from clone-to &&
 +      git init clone-from &&
 +      (
 +              cd clone-from &&
 +              git checkout -b base &&
 +              test_commit A &&
 +              git checkout -b tip &&
 +              git commit --allow-empty -m "will drop by shallow" &&
 +              git commit --allow-empty -m "will keep by shallow" &&
 +              git commit --allow-empty -m "for bundle, not clone" &&
 +              git bundle create tip.bundle tip~1..tip &&
 +              git reset --hard HEAD~1 &&
 +              git checkout base
 +      ) &&
 +      BAD_OID=$(git -C clone-from rev-parse tip~1) &&
 +      TIP_OID=$(git -C clone-from rev-parse tip) &&
 +      git clone --depth=1 --no-single-branch \
 +              "file://$(pwd)/clone-from" clone-to &&
 +      (
 +              cd clone-to &&
 +
 +              # Set up broken history by removing shallow markers
 +              git update-ref -d refs/remotes/origin/tip &&
 +              rm .git/shallow &&
 +
 +              # Verify should fail
 +              test_must_fail git bundle verify \
 +                      ../clone-from/tip.bundle 2>err &&
 +              grep "some prerequisite commits .* are not connected" err &&
 +              test_line_count = 1 err &&
 +
 +              # Unbundling should fail
 +              test_must_fail git bundle unbundle \
 +                      ../clone-from/tip.bundle 2>err &&
 +              grep "some prerequisite commits .* are not connected" err &&
 +              test_line_count = 1 err
 +      )
 +'
 +
+ test_expect_success 'bundle progress includes write phase' '
+       GIT_PROGRESS_DELAY=0 \
+               git bundle create --progress out.bundle --all 2>err &&
+       grep 'Writing' err
+ '
+ test_expect_success TTY 'create --quiet disables all bundle progress' '
+       test_terminal env GIT_PROGRESS_DELAY=0 \
+               git bundle create --quiet out.bundle --all 2>err &&
+       test_must_be_empty err
+ '
  test_done