@@ -50,7 +50,7 @@ func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) {
50
50
c .Assert (err , IsNil )
51
51
req := packp .NewReferenceUpdateRequest ()
52
52
req .Commands = []* packp.Command {
53
- {"master" , plumbing .ZeroHash , plumbing .NewHash ("6ecf0ef2c2dffb796033e5a02219af86ec6584e5" )},
53
+ {Name : "master" , Old : plumbing .ZeroHash , New : plumbing .NewHash ("6ecf0ef2c2dffb796033e5a02219af86ec6584e5" )},
54
54
}
55
55
56
56
writer , err := r .ReceivePack (context .Background (), req )
@@ -99,7 +99,7 @@ func (s *ReceivePackSuite) TestFullSendPackOnEmpty(c *C) {
99
99
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
100
100
req := packp .NewReferenceUpdateRequest ()
101
101
req .Commands = []* packp.Command {
102
- {"refs/heads/master" , plumbing .ZeroHash , fixture .Head },
102
+ {Name : "refs/heads/master" , Old : plumbing .ZeroHash , New : fixture .Head },
103
103
}
104
104
s .receivePack (c , endpoint , req , fixture , full )
105
105
s .checkRemoteHead (c , endpoint , fixture .Head )
@@ -110,7 +110,7 @@ func (s *ReceivePackSuite) TestSendPackWithContext(c *C) {
110
110
req := packp .NewReferenceUpdateRequest ()
111
111
req .Packfile = fixture .Packfile ()
112
112
req .Commands = []* packp.Command {
113
- {"refs/heads/master" , plumbing .ZeroHash , fixture .Head },
113
+ {Name : "refs/heads/master" , Old : plumbing .ZeroHash , New : fixture .Head },
114
114
}
115
115
116
116
r , err := s .Client .NewReceivePackSession (s .EmptyEndpoint , s .EmptyAuth )
@@ -135,7 +135,7 @@ func (s *ReceivePackSuite) TestSendPackOnEmpty(c *C) {
135
135
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
136
136
req := packp .NewReferenceUpdateRequest ()
137
137
req .Commands = []* packp.Command {
138
- {"refs/heads/master" , plumbing .ZeroHash , fixture .Head },
138
+ {Name : "refs/heads/master" , Old : plumbing .ZeroHash , New : fixture .Head },
139
139
}
140
140
s .receivePack (c , endpoint , req , fixture , full )
141
141
s .checkRemoteHead (c , endpoint , fixture .Head )
@@ -147,7 +147,7 @@ func (s *ReceivePackSuite) TestSendPackOnEmptyWithReportStatus(c *C) {
147
147
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
148
148
req := packp .NewReferenceUpdateRequest ()
149
149
req .Commands = []* packp.Command {
150
- {"refs/heads/master" , plumbing .ZeroHash , fixture .Head },
150
+ {Name : "refs/heads/master" , Old : plumbing .ZeroHash , New : fixture .Head },
151
151
}
152
152
req .Capabilities .Set (capability .ReportStatus )
153
153
s .receivePack (c , endpoint , req , fixture , full )
@@ -160,7 +160,7 @@ func (s *ReceivePackSuite) TestFullSendPackOnNonEmpty(c *C) {
160
160
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
161
161
req := packp .NewReferenceUpdateRequest ()
162
162
req .Commands = []* packp.Command {
163
- {"refs/heads/master" , fixture .Head , fixture .Head },
163
+ {Name : "refs/heads/master" , Old : fixture .Head , New : fixture .Head },
164
164
}
165
165
s .receivePack (c , endpoint , req , fixture , full )
166
166
s .checkRemoteHead (c , endpoint , fixture .Head )
@@ -172,7 +172,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmpty(c *C) {
172
172
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
173
173
req := packp .NewReferenceUpdateRequest ()
174
174
req .Commands = []* packp.Command {
175
- {"refs/heads/master" , fixture .Head , fixture .Head },
175
+ {Name : "refs/heads/master" , Old : fixture .Head , New : fixture .Head },
176
176
}
177
177
s .receivePack (c , endpoint , req , fixture , full )
178
178
s .checkRemoteHead (c , endpoint , fixture .Head )
@@ -184,7 +184,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatus(c *C) {
184
184
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
185
185
req := packp .NewReferenceUpdateRequest ()
186
186
req .Commands = []* packp.Command {
187
- {"refs/heads/master" , fixture .Head , fixture .Head },
187
+ {Name : "refs/heads/master" , Old : fixture .Head , New : fixture .Head },
188
188
}
189
189
req .Capabilities .Set (capability .ReportStatus )
190
190
@@ -198,7 +198,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C)
198
198
fixture := fixtures .Basic ().ByTag ("packfile" ).One ()
199
199
req := packp .NewReferenceUpdateRequest ()
200
200
req .Commands = []* packp.Command {
201
- {"refs/heads/master" , plumbing .ZeroHash , fixture .Head },
201
+ {Name : "refs/heads/master" , Old : plumbing .ZeroHash , New : fixture .Head },
202
202
}
203
203
req .Capabilities .Set (capability .ReportStatus )
204
204
@@ -306,7 +306,7 @@ func (s *ReceivePackSuite) testSendPackAddReference(c *C) {
306
306
307
307
req := packp .NewReferenceUpdateRequest ()
308
308
req .Commands = []* packp.Command {
309
- {"refs/heads/newbranch" , plumbing .ZeroHash , fixture .Head },
309
+ {Name : "refs/heads/newbranch" , Old : plumbing .ZeroHash , New : fixture .Head },
310
310
}
311
311
if ar .Capabilities .Supports (capability .ReportStatus ) {
312
312
req .Capabilities .Set (capability .ReportStatus )
@@ -329,7 +329,7 @@ func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) {
329
329
330
330
req := packp .NewReferenceUpdateRequest ()
331
331
req .Commands = []* packp.Command {
332
- {"refs/heads/newbranch" , fixture .Head , plumbing .ZeroHash },
332
+ {Name : "refs/heads/newbranch" , Old : fixture .Head , New : plumbing .ZeroHash },
333
333
}
334
334
if ar .Capabilities .Supports (capability .ReportStatus ) {
335
335
req .Capabilities .Set (capability .ReportStatus )
0 commit comments