Git fork

Merge branch 'js/unreachable-workaround-for-no-symlink-head' into maint-2.51

Code clean-up.

* js/unreachable-workaround-for-no-symlink-head:
refs: forbid clang to complain about unreachable code

+7 -1
+7 -1
refs/files-backend.c
··· 3291 3291 * next update. If not, we try and create a regular symref. 3292 3292 */ 3293 3293 if (update->new_target && refs->prefer_symlink_refs) 3294 - if (!create_ref_symlink(lock, update->new_target)) 3294 + /* 3295 + * By using the `NOT_CONSTANT()` trick, we can avoid 3296 + * errors by `clang`'s `-Wunreachable` logic that would 3297 + * report that the `continue` statement is not reachable 3298 + * when `NO_SYMLINK_HEAD` is `#define`d. 3299 + */ 3300 + if (NOT_CONSTANT(!create_ref_symlink(lock, update->new_target))) 3295 3301 continue; 3296 3302 3297 3303 if (update->flags & REF_NEEDS_COMMIT) {