diff options
Diffstat (limited to 'src/iterator.c')
-rw-r--r-- | src/iterator.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/iterator.c b/src/iterator.c index e52554d4f..267687e01 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -905,3 +905,15 @@ int git_iterator_cmp( return ITERATOR_PREFIXCMP(*iter, entry->path, path_prefix); } +int git_iterator_current_workdir_path(git_iterator *iter, git_buf **path) +{ + workdir_iterator *wi = (workdir_iterator *)iter; + + if (iter->type != GIT_ITERATOR_WORKDIR || !wi->entry.path) + *path = NULL; + else + *path = &wi->path; + + return 0; +} + |