diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-10 13:47:25 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-10 13:47:25 -0800 |
commit | d912b0e44f82dc430a4aac8566a8217b60629638 (patch) | |
tree | 2f8336f1fe82a9b1ca4786c6af31a90ffbeb2356 /Documentation/technical | |
parent | 20e47e50a1a3e2f0781cafe4bb250aa2d9a28c10 (diff) | |
parent | f61988125130ac091bfb69bda5d62b0ad8f054c4 (diff) | |
download | git-d912b0e44f82dc430a4aac8566a8217b60629638.tar.gz |
Merge branch 'as/dir-c-cleanup'
Refactor and generally clean up the directory traversal API
implementation.
* as/dir-c-cleanup:
dir.c: rename free_excludes() to clear_exclude_list()
dir.c: refactor is_path_excluded()
dir.c: refactor is_excluded()
dir.c: refactor is_excluded_from_list()
dir.c: rename excluded() to is_excluded()
dir.c: rename excluded_from_list() to is_excluded_from_list()
dir.c: rename path_excluded() to is_path_excluded()
dir.c: rename cryptic 'which' variable to more consistent name
Improve documentation and comments regarding directory traversal API
api-directory-listing.txt: update to match code
Diffstat (limited to 'Documentation/technical')
-rw-r--r-- | Documentation/technical/api-directory-listing.txt | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Documentation/technical/api-directory-listing.txt b/Documentation/technical/api-directory-listing.txt index add6f435b5..944fc39fac 100644 --- a/Documentation/technical/api-directory-listing.txt +++ b/Documentation/technical/api-directory-listing.txt @@ -9,37 +9,40 @@ Data structure -------------- `struct dir_struct` structure is used to pass directory traversal -options to the library and to record the paths discovered. The notable -options are: +options to the library and to record the paths discovered. A single +`struct dir_struct` is used regardless of whether or not the traversal +recursively descends into subdirectories. + +The notable options are: `exclude_per_dir`:: The name of the file to be read in each directory for excluded files (typically `.gitignore`). -`collect_ignored`:: +`flags`:: - Include paths that are to be excluded in the result. + A bit-field of options: -`show_ignored`:: +`DIR_SHOW_IGNORED`::: The traversal is for finding just ignored files, not unignored files. -`show_other_directories`:: +`DIR_SHOW_OTHER_DIRECTORIES`::: Include a directory that is not tracked. -`hide_empty_directories`:: +`DIR_HIDE_EMPTY_DIRECTORIES`::: Do not include a directory that is not tracked and is empty. -`no_gitlinks`:: +`DIR_NO_GITLINKS`::: If set, recurse into a directory that looks like a git directory. Otherwise it is shown as a directory. -The result of the enumeration is left in these fields:: +The result of the enumeration is left in these fields: `entries[]`:: |