File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1261,7 +1261,7 @@ bool commit_exists(const char *commit_hash)
1261
1261
char buffer [1024 ];
1262
1262
while (fgets (buffer , sizeof (buffer ), stream )) {
1263
1263
/* 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 )) {
1265
1265
found = true;
1266
1266
break ;
1267
1267
}
@@ -1305,10 +1305,13 @@ static bool sanity_check()
1305
1305
return false;
1306
1306
}
1307
1307
#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 ,
1310
1312
"FATAL: The repository is outdated. Please update properly.\n" );
1311
- return false;
1313
+ return false;
1314
+ }
1312
1315
}
1313
1316
1314
1317
return true;
You can’t perform that action at this time.
0 commit comments