]> git.ipfire.org Git - thirdparty/git.git/commitdiff
dir: mark output only fields of dir_struct as such
authorElijah Newren <newren@gmail.com>
Mon, 27 Feb 2023 15:28:12 +0000 (15:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2023 16:29:50 +0000 (08:29 -0800)
While at it, also group these fields together for convenience.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.h

diff --git a/dir.h b/dir.h
index 2196e12630c527cd43f8cd471013fcf63eb7f375..e8106e1ecacb3e29988af9a9055a2f2f74483802 100644 (file)
--- a/dir.h
+++ b/dir.h
@@ -212,12 +212,6 @@ struct untracked_cache {
  */
 struct dir_struct {
 
-       /* The number of members in `entries[]` array. */
-       int nr;
-
-       /* The number of members in `ignored[]` array. */
-       int ignored_nr;
-
        /* bit-field of options */
        enum {
 
@@ -282,14 +276,20 @@ struct dir_struct {
                DIR_SKIP_NESTED_GIT = 1<<9
        } flags;
 
+       /* The number of members in `entries[]` array. */
+       int nr; /* output only */
+
+       /* The number of members in `ignored[]` array. */
+       int ignored_nr; /* output only */
+
        /* An array of `struct dir_entry`, each element of which describes a path. */
-       struct dir_entry **entries;
+       struct dir_entry **entries; /* output only */
 
        /**
         * used for ignored paths with the `DIR_SHOW_IGNORED_TOO` and
         * `DIR_COLLECT_IGNORED` flags.
         */
-       struct dir_entry **ignored;
+       struct dir_entry **ignored; /* output only */
 
        /* Enable/update untracked file cache if set */
        struct untracked_cache *untracked;