diff options
author | Russell Belfer <rb@github.com> | 2012-10-08 15:14:12 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-08 15:22:40 -0700 |
commit | dfbff793b8f39995d3a8744d6b7d75d5cc7201a0 (patch) | |
tree | 0ffa00f2e946fc65596b08b6064ac2fee25a0963 /src/iterator.h | |
parent | 543864b677704845660085d2b2b2249cabb084a4 (diff) | |
download | libgit2-dfbff793b8f39995d3a8744d6b7d75d5cc7201a0.tar.gz |
Fix a few diff bugs with directory content
There are a few cases where diff should leave directories in
the diff list if we want to match core git, such as when the
directory contains a .git dir. That feature was lost when I
introduced some of the new submodule handling.
This restores that and then fixes a couple of related to diff
output that are triggered by having diffs with directories in
them.
Also, this adds a new flag that can be passed to diff if you
want diff output to actually include the file content of any
untracked files.
Diffstat (limited to 'src/iterator.h')
-rw-r--r-- | src/iterator.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/iterator.h b/src/iterator.h index 11cd2182c..29c8985d4 100644 --- a/src/iterator.h +++ b/src/iterator.h @@ -10,6 +10,7 @@ #include "common.h" #include "git2/index.h" #include "vector.h" +#include "buffer.h" #define ITERATOR_PREFIXCMP(ITER, STR, PREFIX) (((ITER).ignore_case) ? \ git__prefixcmp_icase((STR), (PREFIX)) : \ @@ -166,4 +167,11 @@ extern int git_iterator_advance_into_directory( extern int git_iterator_cmp( git_iterator *iter, const char *path_prefix); +/** + * Get the full path of the current item from a workdir iterator. + * This will return NULL for a non-workdir iterator. + */ +extern int git_iterator_current_workdir_path( + git_iterator *iter, git_buf **path); + #endif |