Skip to content

Commit

Permalink
trace2:data: add vfs stats
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
  • Loading branch information
jeffhostetler committed Dec 21, 2018
1 parent 68d0a78 commit 7336c10
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion virtualfilesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ void apply_virtualfilesystem(struct index_state *istate)
{
char *buf, *entry;
int i;
int nr_tracked = 0;

if (!git_config_get_virtualfilesystem())
return;
Expand Down Expand Up @@ -278,6 +279,7 @@ void apply_virtualfilesystem(struct index_state *istate)
pos = -pos - 1;
while (pos < istate->cache_nr && !fspathncmp(istate->cache[pos]->name, entry, len)) {
istate->cache[pos]->ce_flags &= ~CE_SKIP_WORKTREE;
nr_tracked++;
pos++;
}
}
Expand All @@ -288,14 +290,19 @@ void apply_virtualfilesystem(struct index_state *istate)
ce->ce_flags &= ~CE_SKIP_WORKTREE;
} else {
int pos = index_name_pos(istate, entry, len);
if (pos >= 0)
if (pos >= 0) {
nr_tracked++;
istate->cache[pos]->ce_flags &= ~CE_SKIP_WORKTREE;
}
}
}

entry += len + 1;
}
}

if (nr_tracked > 0)
trace2_data_intmax("vfs", the_repository, "apply/tracked", nr_tracked);
}

/*
Expand Down

0 comments on commit 7336c10

Please sign in to comment.