summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2019-07-10 20:59:00 -0300
committerJunio C Hamano <gitster@pobox.com>2019-07-11 13:52:15 -0700
commitfa1da7d2eef0fedf0e5942028513912bf2bb64ed (patch)
tree16cf05a5a051db67fb4bc97559223a64eb77d5a4 /refs
parent3012397e0327f5e4dfd1d1183a792268429744ae (diff)
downloadgit-fa1da7d2eef0fedf0e5942028513912bf2bb64ed.tar.gz
dir-iterator: add flags parameter to dir_iterator_begin
Add the possibility of giving flags to dir_iterator_begin to initialize a dir-iterator with special options. Currently possible flags are: - DIR_ITERATOR_PEDANTIC, which makes dir_iterator_advance abort immediately in the case of an error, instead of keep looking for the next valid entry; - DIR_ITERATOR_FOLLOW_SYMLINKS, which makes the iterator follow symlinks and include linked directories' contents in the iteration. These new flags will be used in a subsequent patch. Also add tests for the flags' usage and adjust refs/files-backend.c to the new dir_iterator_begin signature. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 7ed81046d4..b1f8f53a09 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2150,7 +2150,7 @@ static struct ref_iterator *reflog_iterator_begin(struct ref_store *ref_store,
strbuf_addf(&sb, "%s/logs", gitdir);
- diter = dir_iterator_begin(sb.buf);
+ diter = dir_iterator_begin(sb.buf, 0);
if(!diter)
return empty_ref_iterator_begin();