File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -661,4 +661,25 @@ test_expect_success 'fetch shallow since ...' '
661
661
test_cmp expected actual
662
662
'
663
663
664
+ test_expect_success ' shallow clone exclude tag two' '
665
+ test_create_repo shallow-exclude &&
666
+ (
667
+ cd shallow-exclude &&
668
+ test_commit one &&
669
+ test_commit two &&
670
+ test_commit three &&
671
+ git clone --shallow-exclude two "file://$(pwd)/." ../shallow12 &&
672
+ git -C ../shallow12 log --pretty=tformat:%s HEAD >actual &&
673
+ echo three >expected &&
674
+ test_cmp expected actual
675
+ )
676
+ '
677
+
678
+ test_expect_success ' fetch exclude tag one' '
679
+ git -C shallow12 fetch --shallow-exclude one origin &&
680
+ git -C shallow12 log --pretty=tformat:%s origin/master >actual &&
681
+ test_write_lines three two >expected &&
682
+ test_cmp expected actual
683
+ '
684
+
664
685
test_done
Original file line number Diff line number Diff line change @@ -98,5 +98,27 @@ test_expect_success 'fetch shallow since ...' '
98
98
test_cmp expected actual
99
99
'
100
100
101
+ test_expect_success ' shallow clone exclude tag two' '
102
+ test_create_repo shallow-exclude &&
103
+ (
104
+ cd shallow-exclude &&
105
+ test_commit one &&
106
+ test_commit two &&
107
+ test_commit three &&
108
+ mv .git "$HTTPD_DOCUMENT_ROOT_PATH/shallow-exclude.git" &&
109
+ git clone --shallow-exclude two $HTTPD_URL/smart/shallow-exclude.git ../shallow12 &&
110
+ git -C ../shallow12 log --pretty=tformat:%s HEAD >actual &&
111
+ echo three >expected &&
112
+ test_cmp expected actual
113
+ )
114
+ '
115
+
116
+ test_expect_success ' fetch exclude tag one' '
117
+ git -C shallow12 fetch --shallow-exclude one origin &&
118
+ git -C shallow12 log --pretty=tformat:%s origin/master >actual &&
119
+ test_write_lines three two >expected &&
120
+ test_cmp expected actual
121
+ '
122
+
101
123
stop_httpd
102
124
test_done
You can’t perform that action at this time.
0 commit comments