Skip to content

Commit add7a58

Browse files
Anthony Shawdscho
authored andcommitted
fixup! fscache: fscache takes an initial size
Fix a copy-paste bug at the end of `cmd_add()`: the cleanup site called `enable_fscache(0)` again instead of `disable_fscache()`, leaking the refcount. Harmless in a one-shot process today, but it confuses the matching enable/disable contract that callers and reviewers expect. Signed-off-by: Anthony Shaw <anthonyshaw@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 0a32e7b commit add7a58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builtin/add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,6 @@ int cmd_add(int argc,
609609
free(ps_matched);
610610
dir_clear(&dir);
611611
clear_pathspec(&pathspec);
612-
enable_fscache(0);
612+
disable_fscache();
613613
return exit_status;
614614
}

0 commit comments

Comments
 (0)