summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2019-07-10 20:59:03 -0300
committerJunio C Hamano <gitster@pobox.com>2019-07-11 13:52:16 -0700
commitff7ccc8c9a6e61a7225c161c743a49ac079f1425 (patch)
treee80c49f77a3d2c299decb7218ca78ca7d4e79664 /commit.c
parent14954b799f0bac76e500593c95d1f274cf0636e5 (diff)
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 'commit.c')
0 files changed, 0 insertions, 0 deletions