File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,7 @@ obtained through ref discovery.
228
228
The client MUST write all obj-ids which it only has shallow copies
229
229
of (meaning that it does not have the parents of a commit) as
230
230
'shallow' lines so that the server is aware of the limitations of
231
- the client's history. Clients MUST NOT mention an obj-id which
232
- it does not know exists on the server.
231
+ the client's history.
233
232
234
233
The client now sends the maximum commit history depth it wants for
235
234
this transaction, which is the number of commits it wants from the
Original file line number Diff line number Diff line change @@ -373,6 +373,20 @@ test_expect_success 'clone shallow with packed refs' '
373
373
test_cmp count8.expected count8.actual
374
374
'
375
375
376
+ test_expect_success ' fetch in shallow repo unreachable shallow objects' '
377
+ (
378
+ git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog &&
379
+ git clone --depth 1 "file://$(pwd)/no-reflog" shallow9 &&
380
+ cd no-reflog &&
381
+ git tag -d TAGB1 TAGB2 &&
382
+ git update-ref refs/heads/B B~~ &&
383
+ git gc --prune=now &&
384
+ cd ../shallow9 &&
385
+ git fetch origin &&
386
+ git fsck --no-dangling
387
+ )
388
+ '
389
+
376
390
test_expect_success ' setup tests for the --stdin parameter' '
377
391
for head in C D E F
378
392
do
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ static void receive_needs(void)
592
592
die ("invalid shallow line: %s" , line );
593
593
object = parse_object (sha1 );
594
594
if (!object )
595
- die ( "did not find object for %s" , line ) ;
595
+ continue ;
596
596
if (object -> type != OBJ_COMMIT )
597
597
die ("invalid shallow object %s" , sha1_to_hex (sha1 ));
598
598
if (!(object -> flags & CLIENT_SHALLOW )) {
You can’t perform that action at this time.
0 commit comments