]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jx/bundle'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Jan 2021 22:19:19 +0000 (14:19 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jan 2021 22:19:19 +0000 (14:19 -0800)
"git bundle" learns "--stdin" option to read its refs from the
standard input.  Also, it now does not lose refs whey they point
at the same object.

* jx/bundle:
  bundle: arguments can be read from stdin
  bundle: lost objects when removing duplicate pendings
  test: add helper functions for git-bundle

1  2 
t/t5510-fetch.sh
t/t5607-clone-bundle.sh

index 8da907e770d837c52092293bfc8d1f3d1500dc12,1e398380eb04fa5a293a1394230c7d9bb8cc695d..42f550300476a1e7ddae6b88dc0a04bb89ff0d80
@@@ -5,10 -5,8 +5,11 @@@ test_description='Per branch config var
  
  '
  
 +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 +
  . ./test-lib.sh
+ . "$TEST_DIRECTORY"/test-bundle-functions.sh
  
  D=$(pwd)
  
index 5b39f4a2880d43f57d142a61f076968add9d3095,425258767d43424b94050d81c674023377b7044a..f4c383cd5ce770aeafb874a48748445a8bec247a
@@@ -41,16 -38,16 +41,16 @@@ test_expect_success 'die if bundle fil
        test_must_fail git bundle create adir --all
  '
  
- test_expect_failure 'bundle --stdin' '
+ test_expect_success 'bundle --stdin' '
 -      echo master | git bundle create stdin-bundle.bdl --stdin &&
 +      echo main | git bundle create stdin-bundle.bdl --stdin &&
        git ls-remote stdin-bundle.bdl >output &&
 -      grep master output
 +      grep main output
  '
  
- test_expect_failure 'bundle --stdin <rev-list options>' '
+ test_expect_success 'bundle --stdin <rev-list options>' '
 -      echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
 +      echo main | git bundle create hybrid-bundle.bdl --stdin tag &&
        git ls-remote hybrid-bundle.bdl >output &&
 -      grep master output
 +      grep main output
  '
  
  test_expect_success 'empty bundle file is rejected' '