diff options
author | Russell Belfer <rb@github.com> | 2012-12-11 03:29:44 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-12-11 03:38:41 +0400 |
commit | 91e7d26303b17c7ebc45ba565247e968aaa20848 (patch) | |
tree | cb205e56dfcbf9dd4df6ed150f152106aa6da342 /src/tree.c | |
parent | 9950d27ab62cc31a3ebf1944fd33dd65432be790 (diff) |
Fix iterator reset and add reset ranges
The `git_iterator_reset` command has not been working in all cases
particularly when there is a start and end range. This fixes it
and adds tests for it, and also extends it with the ability to
update the start/end range strings when an iterator is reset.
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tree.c b/src/tree.c index 944992fea..7f1b9feb1 100644 --- a/src/tree.c +++ b/src/tree.c @@ -301,6 +301,9 @@ int git_tree__prefix_position(git_tree *tree, const char *path) struct tree_key_search ksearch; size_t at_pos; + if (!path) + return 0; + ksearch.filename = path; ksearch.filename_len = strlen(path); |