Skip to content

Commit 0fe07a1

Browse files
committed
Do temporary check
Change-Id: Icfad9b856a234279082f0b6acd6c075090f73442
1 parent 993fc09 commit 0fe07a1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

qtest.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ bool commit_exists(const char *commit_hash)
12611261
char buffer[1024];
12621262
while (fgets(buffer, sizeof(buffer), stream)) {
12631263
/* Compare the first 40 characters of each line with commit_hash */
1264-
if (strncmp(buffer, commit_hash, 40) == 0) {
1264+
if (!strncmp(buffer, commit_hash, 40)) {
12651265
found = true;
12661266
break;
12671267
}
@@ -1305,10 +1305,13 @@ static bool sanity_check()
13051305
return false;
13061306
}
13071307
#define COPYRIGHT_COMMIT_SHA1 "50c5ac53d31adf6baac4f8d3db6b3ce2215fee40"
1308-
if (!commit_exists(COPYRIGHT_COMMIT_SHA1)) {
1309-
fprintf(stderr,
1308+
if (stat("lab0-c-private", &buf)) { /* Skip the check in CI */
1309+
if (!commit_exists(COPYRIGHT_COMMIT_SHA1)) {
1310+
fprintf(
1311+
stderr,
13101312
"FATAL: The repository is outdated. Please update properly.\n");
1311-
return false;
1313+
return false;
1314+
}
13121315
}
13131316

13141317
return true;

0 commit comments

Comments
 (0)