Skip to content

Commit

Permalink
fscache: add key for GIT_TRACE_FSCACHE
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
  • Loading branch information
jeffhostetler committed Jan 24, 2017
1 parent 4af28e2 commit 0217bed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compat/win32/fscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ static int initialized;
static volatile long enabled;
static struct hashmap map;
static CRITICAL_SECTION mutex;
static struct trace_key trace_fscache = TRACE_KEY_INIT(FSCACHE);

/*
* An entry in the file system cache. Used for both entire directory listings
Expand Down Expand Up @@ -191,6 +192,8 @@ static struct fsentry *fsentry_create_list(const struct fsentry *dir)
if (h == INVALID_HANDLE_VALUE) {
err = GetLastError();
errno = (err == ERROR_DIRECTORY) ? ENOTDIR : err_win_to_posix(err);
trace_printf_key(&trace_fscache, "fscache: error(%d) '%.*s'\n",
errno, dir->len, dir->name);
return NULL;
}

Expand Down Expand Up @@ -392,6 +395,7 @@ int fscache_enable(int enable)
fscache_clear();
LeaveCriticalSection(&mutex);
}
trace_printf_key(&trace_fscache, "fscache: enable(%d)\n", enable);
return result;
}

Expand Down

0 comments on commit 0217bed

Please sign in to comment.