@@ -19,6 +19,7 @@ static char *_remote_ssh_pubkey = NULL;
1919static char * _remote_ssh_passphrase = NULL ;
2020
2121static char * _remote_default = NULL ;
22+ static char * _remote_expectcontinue = NULL ;
2223
2324static int cred_acquire_cb (git_cred * * , const char * , const char * , unsigned int , void * );
2425
@@ -366,12 +367,16 @@ void test_online_push__initialize(void)
366367 _remote_ssh_pubkey = cl_getenv ("GITTEST_REMOTE_SSH_PUBKEY" );
367368 _remote_ssh_passphrase = cl_getenv ("GITTEST_REMOTE_SSH_PASSPHRASE" );
368369 _remote_default = cl_getenv ("GITTEST_REMOTE_DEFAULT" );
370+ _remote_expectcontinue = cl_getenv ("GITTEST_REMOTE_EXPECTCONTINUE" );
369371 _remote = NULL ;
370372
371373 /* Skip the test if we're missing the remote URL */
372374 if (!_remote_url )
373375 cl_skip ();
374376
377+ if (_remote_expectcontinue )
378+ git_libgit2_opts (GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE , 1 );
379+
375380 cl_git_pass (git_remote_create (& _remote , _repo , "test" , _remote_url ));
376381
377382 record_callbacks_data_clear (& _record_cbs_data );
@@ -417,10 +422,13 @@ void test_online_push__cleanup(void)
417422 git__free (_remote_ssh_pubkey );
418423 git__free (_remote_ssh_passphrase );
419424 git__free (_remote_default );
425+ git__free (_remote_expectcontinue );
420426
421427 /* Freed by cl_git_sandbox_cleanup */
422428 _repo = NULL ;
423429
430+ git_libgit2_opts (GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE , 0 );
431+
424432 record_callbacks_data_clear (& _record_cbs_data );
425433
426434 cl_fixture_cleanup ("testrepo.git" );
0 commit comments