summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-25 21:26:48 -0700
committerRussell Belfer <arrbee@arrbee.com>2012-03-25 21:26:48 -0700
commit875bfc5ffcdd21fca616d4f88444d4dcf6fd69ac (patch)
treeaced87c6697ae40d8ff7fc8e69356dc61913243c /src
parentc8838ee92d85b3f027f8cabd87b98b682778cdbf (diff)
downloadlibgit2-875bfc5ffcdd21fca616d4f88444d4dcf6fd69ac.tar.gz
Fix error in tree iterator when popping up trees
There was an error in the tree iterator where it would delete two tree levels instead of just one when popping up a tree level. Unfortunately the test data for the tree iterator did not have any deep trees with subtrees in the middle of the tree items, so this problem went unnoticed. This contains the 1-line fix plus new test data and tests that reveal the issue.
Diffstat (limited to 'src')
-rw-r--r--src/iterator.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/iterator.c b/src/iterator.c
index 001bee7b0..aa73d3182 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -121,7 +121,6 @@ static int tree_iterator__advance(
break;
tree_iterator__pop_frame(ti);
- git_buf_rtruncate_at_char(&ti->path, '/');
}
if (te && entry_is_tree(te))