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 @@ -1065,4 +1065,32 @@ test_expect_success 'stdin -z delete refs works with packed and loose refs' '
1065
1065
test_must_fail git rev-parse --verify -q $c
1066
1066
'
1067
1067
1068
+ run_with_limited_open_files () {
1069
+ (ulimit -n 32 && " $@ " )
1070
+ }
1071
+
1072
+ test_lazy_prereq ULIMIT_FILE_DESCRIPTORS ' run_with_limited_open_files true'
1073
+
1074
+ test_expect_failure ULIMIT_FILE_DESCRIPTORS ' large transaction creating branches does not burst open file limit' '
1075
+ (
1076
+ for i in $(test_seq 33)
1077
+ do
1078
+ echo "create refs/heads/$i HEAD"
1079
+ done >large_input &&
1080
+ run_with_limited_open_files git update-ref --stdin <large_input &&
1081
+ git rev-parse --verify -q refs/heads/33
1082
+ )
1083
+ '
1084
+
1085
+ test_expect_failure ULIMIT_FILE_DESCRIPTORS ' large transaction deleting branches does not burst open file limit' '
1086
+ (
1087
+ for i in $(test_seq 33)
1088
+ do
1089
+ echo "delete refs/heads/$i HEAD"
1090
+ done >large_input &&
1091
+ run_with_limited_open_files git update-ref --stdin <large_input &&
1092
+ test_must_fail git rev-parse --verify -q refs/heads/33
1093
+ )
1094
+ '
1095
+
1068
1096
test_done
You can’t perform that action at this time.
0 commit comments