diff options
author | Matheus Tavares <matheus.bernardino@usp.br> | 2019-07-10 20:59:03 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-11 13:52:16 -0700 |
commit | ff7ccc8c9a6e61a7225c161c743a49ac079f1425 (patch) | |
tree | e80c49f77a3d2c299decb7218ca78ca7d4e79664 /.gitignore | |
parent | clone: extract function from copy_or_link_directory (diff) | |
download | tgif-ff7ccc8c9a6e61a7225c161c743a49ac079f1425.tar.xz |
clone: use dir-iterator to avoid explicit dir traversal
Replace usage of opendir/readdir/closedir API to traverse directories
recursively, at copy_or_link_directory function, by the dir-iterator
API. This simplifies the code and avoids recursive calls to
copy_or_link_directory.
This process also makes copy_or_link_directory call die() in case of an
error on readdir or stat inside dir_iterator_advance. Previously it
would just print a warning for errors on stat and ignore errors on
readdir, which isn't nice because a local git clone could succeed even
though the .git/objects copy didn't fully succeed.
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions