Skip to content

Commit a872782

Browse files
committed
fix: don't pass 'include-tag' as argument by default.
This flag always has to be added by the caller based on configuration.
1 parent 15ecd84 commit a872782

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

git-protocol/src/command/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ mod with_io {
9494
/// Only useful for V2
9595
pub(crate) fn initial_arguments(&self, features: &[Feature]) -> Vec<BString> {
9696
match self {
97-
Command::Fetch => ["thin-pack", "include-tag", "ofs-delta"]
97+
Command::Fetch => ["thin-pack", "ofs-delta"]
9898
.iter()
9999
.map(|s| s.as_bytes().as_bstr().to_owned())
100100
.chain(

git-protocol/src/command/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ mod v2 {
8888
git_transport::Protocol::V2,
8989
&capabilities("fetch", "shallow filter sideband-all packfile-uris")
9090
)),
91-
["thin-pack", "include-tag", "ofs-delta", "sideband-all"]
91+
["thin-pack", "ofs-delta", "sideband-all"]
9292
.iter()
9393
.map(|s| s.as_bytes().as_bstr().to_owned())
9494
.collect::<Vec<_>>(),

git-protocol/src/fetch/tests.rs

-4
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ mod arguments {
260260
out.as_bstr(),
261261
b"0012command=fetch
262262
0001000ethin-pack
263-
0010include-tag
264263
000eofs-delta
265264
000ddeepen 1
266265
0014deepen-relative
@@ -294,7 +293,6 @@ mod arguments {
294293
out.as_bstr(),
295294
b"0012command=fetch
296295
0001000ethin-pack
297-
0010include-tag
298296
000eofs-delta
299297
000ddeepen 1
300298
0017deepen-since 12345
@@ -304,7 +302,6 @@ mod arguments {
304302
0032have 0000000000000000000000000000000000000000
305303
00000012command=fetch
306304
0001000ethin-pack
307-
0010include-tag
308305
000eofs-delta
309306
000ddeepen 1
310307
0017deepen-since 12345
@@ -332,7 +329,6 @@ mod arguments {
332329
out.as_bstr(),
333330
b"0012command=fetch
334331
0001000ethin-pack
335-
0010include-tag
336332
000eofs-delta
337333
001dwant-ref refs/heads/main
338334
0009done

git-protocol/src/handshake/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub enum Ref {
1616
},
1717
/// A ref pointing to a commit object
1818
Direct {
19-
/// The name at which the ref is located, like `refs/heads/main`.
19+
/// The name at which the ref is located, like `refs/heads/main` or `refs/tags/v1.0` for lightweight tags.
2020
full_ref_name: BString,
2121
/// The hash of the object the ref points to.
2222
object: git_hash::ObjectId,

git-protocol/tests/fetch/v2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ async fn ref_in_want() -> crate::Result {
185185
"002fgit-upload-pack does/not/matter\0\0version=2\00012command=fetch
186186
0014agent={}
187187
0001000ethin-pack
188-
0010include-tag
189188
000eofs-delta
190189
001dwant-ref refs/heads/main
191190
0009done

0 commit comments

Comments
 (0)