File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -973,4 +973,32 @@ test_expect_success 'stdin -z delete refs works with packed and loose refs' '
973
973
test_must_fail git rev-parse --verify -q $c
974
974
'
975
975
976
+ run_with_limited_open_files () {
977
+ (ulimit -n 32 && " $@ " )
978
+ }
979
+
980
+ test_lazy_prereq ULIMIT_FILE_DESCRIPTORS ' run_with_limited_open_files true'
981
+
982
+ test_expect_failure ULIMIT_FILE_DESCRIPTORS ' large transaction creating branches does not burst open file limit' '
983
+ (
984
+ for i in $(test_seq 33)
985
+ do
986
+ echo "create refs/heads/$i HEAD"
987
+ done >large_input &&
988
+ run_with_limited_open_files git update-ref --stdin <large_input &&
989
+ git rev-parse --verify -q refs/heads/33
990
+ )
991
+ '
992
+
993
+ test_expect_failure ULIMIT_FILE_DESCRIPTORS ' large transaction deleting branches does not burst open file limit' '
994
+ (
995
+ for i in $(test_seq 33)
996
+ do
997
+ echo "delete refs/heads/$i HEAD"
998
+ done >large_input &&
999
+ run_with_limited_open_files git update-ref --stdin <large_input &&
1000
+ test_must_fail git rev-parse --verify -q refs/heads/33
1001
+ )
1002
+ '
1003
+
976
1004
test_done
You can’t perform that action at this time.
0 commit comments