Thread (15 messages) 15 messages, 3 authors, 2025-11-18

Re: [PATCH v3 2/2] repo: add --all to git-repo-info

From: Eric Sunshine <hidden>
Date: 2025-10-27 00:25:09

On Sun, Oct 26, 2025 at 8:22 PM Eric Sunshine [off-list ref] wrote:
On Sun, Oct 26, 2025 at 6:54 PM Lucas Seiki Oshiro
[off-list ref] wrote:
quoted
+       for (unsigned long i = 0; i < ARRAY_SIZE(repo_info_fields); i++) {
+               struct field field = repo_info_fields[i];
Why do we need to make a copy of the field record? Can't we just use a
const pointer?

    struct field *field = &repo_info_fields[i];

or:

   struct field *field = repo_info_fields + i;
Of course, I mean to have a `const` in there:

    const struct field *field = &repo_info_fields[i];
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help