Skip to content

Commit 34a8b0e

Browse files
dschogitster
authored andcommitted
mark_colliding_entries(): fix incorrect #if...#endif guard
The way the guard was put, the code was declaring an unused variable on Windows. No need to do that, so let's fix it. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f80218b commit 34a8b0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

entry.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,9 @@ static int check_path(const char *path, int len, struct stat *st, int skiplen)
402402
static void mark_colliding_entries(const struct checkout *state,
403403
struct cache_entry *ce, struct stat *st)
404404
{
405+
#if !defined(GIT_WINDOWS_NATIVE) /* inode is always zero on Windows */
405406
int i;
406407

407-
ce->ce_flags |= CE_MATCHED;
408-
409-
#if !defined(GIT_WINDOWS_NATIVE) /* inode is always zero on Windows */
410408
for (i = 0; i < state->istate->cache_nr; i++) {
411409
struct cache_entry *dup = state->istate->cache[i];
412410

@@ -422,6 +420,8 @@ static void mark_colliding_entries(const struct checkout *state,
422420
}
423421
}
424422
#endif
423+
424+
ce->ce_flags |= CE_MATCHED;
425425
}
426426

427427
/*

0 commit comments

Comments
 (0)