Skip to content

Commit f4926a0

Browse files
committed
Fixup refreshReferences
Reset baton->error_code to GIT_OK on clean loop exit. Use \\s instead of \s for regex string
1 parent ea358d4 commit f4926a0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

generate/templates/manual/repository/refresh_references.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class RefreshedRefModel {
148148
x509Array,
149149
Nan::New<Number>(0),
150150
Nan::New<v8::RegExp>(
151-
Nan::New("-----BEGIN SIGNED MESSAGE-----[\s\S]+?-----END SIGNED MESSAGE-----").ToLocalChecked(),
151+
Nan::New("-----BEGIN SIGNED MESSAGE-----[\\s\\S]+?-----END SIGNED MESSAGE-----").ToLocalChecked(),
152152
static_cast<v8::RegExp::Flags>(v8::RegExp::Flags::kGlobal | v8::RegExp::Flags::kMultiline)
153153
).ToLocalChecked()
154154
);
@@ -556,6 +556,8 @@ void GitRepository::RefreshReferencesWorker::Execute()
556556

557557
if (baton->error_code == GIT_OK) {
558558
refreshData->refs.push_back(refreshedRefModel);
559+
} else {
560+
baton->error_code = GIT_OK;
559561
}
560562
}
561563

0 commit comments

Comments
 (0)