]> git.proxmox.com Git - libgit2.git/commit - tests-clar/status/status_data.h
Fix crash in new status and add recurse option
authorRussell Belfer <arrbee@arrbee.com>
Fri, 23 Mar 2012 16:26:09 +0000 (09:26 -0700)
committerRussell Belfer <arrbee@arrbee.com>
Fri, 23 Mar 2012 16:26:09 +0000 (09:26 -0700)
commit4b136a94d948e62634633092c9d1052c4b074e6c
tree15ea545035aa86f064ff62c755f24a5c80f28035
parent98c4613e2d79f73d5168582c23e87faebc69787b
Fix crash in new status and add recurse option

This fixes the bug that @nulltoken found (thank you!) where
if there were untracked directories alphabetically after the
last tracked item, the diff implementation would deref a NULL
pointer.

The fix involved the code which decides if it is necessary
to recurse into a directory in the working dir, so it was
easy to add a new option `GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS`
to control if the contents of untracked directories should be
included in status.
include/git2/diff.h
include/git2/status.h
src/diff.c
src/status.c
tests-clar/status/status_data.h
tests-clar/status/worktree.c