Documentation/git-commit.txt: rework the --cleanup section
[gitweb.git] / Documentation / technical / api-directory-listing.txt
index 944fc39fac8b26ceaee781fe4a18b9ba2d78ac9d..1f349b28ae175327706fa67a3e0b09f1a26a9c02 100644 (file)
@@ -39,7 +39,7 @@ The notable options are:
 
 `DIR_NO_GITLINKS`:::
 
-       If set, recurse into a directory that looks like a git
+       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:
@@ -67,11 +67,13 @@ marked. If you to exclude files, make sure you have loaded index first.
 * Prepare `struct dir_struct dir` and clear it with `memset(&dir, 0,
   sizeof(dir))`.
 
-* Call `add_exclude()` to add single exclude pattern,
-  `add_excludes_from_file()` to add patterns from a file
-  (e.g. `.git/info/exclude`), and/or set `dir.exclude_per_dir`.  A
-  short-hand function `setup_standard_excludes()` can be used to set up
-  the standard set of exclude settings.
+* To add single exclude pattern, call `add_exclude_list()` and then
+  `add_exclude()`.
+
+* To add patterns from a file (e.g. `.git/info/exclude`), call
+  `add_excludes_from_file()` , and/or set `dir.exclude_per_dir`.  A
+  short-hand function `setup_standard_excludes()` can be used to set
+  up the standard set of exclude settings.
 
 * Set options described in the Data Structure section above.
 
@@ -79,4 +81,6 @@ marked. If you to exclude files, make sure you have loaded index first.
 
 * Use `dir.entries[]`.
 
+* Call `clear_directory()` when none of the contained elements are no longer in use.
+
 (JC)