File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -613,9 +613,10 @@ static int _git_repository_open_ext_from_env(
613613 git_repository_set_odb (repo , odb );
614614
615615 error = git__getenv (& alts_buf , "GIT_ALTERNATE_OBJECT_DIRECTORIES" );
616- if (error == GIT_ENOTFOUND )
616+ if (error == GIT_ENOTFOUND ) {
617617 giterr_clear ();
618- else if (error < 0 )
618+ error = 0 ;
619+ } else if (error < 0 )
619620 goto error ;
620621 else {
621622 const char * end ;
@@ -638,9 +639,11 @@ static int _git_repository_open_ext_from_env(
638639 }
639640 }
640641
641- error = git_repository_set_namespace (repo , git_buf_cstr (& namespace_buf ));
642- if (error < 0 )
643- goto error ;
642+ if (git_buf_len (& namespace_buf )) {
643+ error = git_repository_set_namespace (repo , git_buf_cstr (& namespace_buf ));
644+ if (error < 0 )
645+ goto error ;
646+ }
644647
645648 git_repository_set_index (repo , index );
646649
You can’t perform that action at this time.
0 commit comments