summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-23 09:26:09 -0700
committerRussell Belfer <arrbee@arrbee.com>2012-03-23 09:26:09 -0700
commit4b136a94d948e62634633092c9d1052c4b074e6c (patch)
tree15ea545035aa86f064ff62c755f24a5c80f28035 /include/git2/diff.h
parent98c4613e2d79f73d5168582c23e87faebc69787b (diff)
downloadlibgit2-4b136a94d948e62634633092c9d1052c4b074e6c.tar.gz
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.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index cb3ef4e1..0c9f620c 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -40,7 +40,8 @@ enum {
GIT_DIFF_PATIENCE = (1 << 6),
GIT_DIFF_INCLUDE_IGNORED = (1 << 7),
GIT_DIFF_INCLUDE_UNTRACKED = (1 << 8),
- GIT_DIFF_INCLUDE_UNMODIFIED = (1 << 9)
+ GIT_DIFF_INCLUDE_UNMODIFIED = (1 << 9),
+ GIT_DIFF_RECURSE_UNTRACKED_DIRS = (1 << 10),
};
/**