diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-04 10:53:01 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-04 10:53:01 -0800 |
| commit | 34af1d6e879c172ed670d8e94ce107cf120a8c74 (patch) | |
| tree | 3b775f0dee424328a2f2147569593e48c642ae74 /Documentation/CodingGuidelines | |
| parent | 50d742576777503eebd9f0f2c6410f64a872a10a (diff) | |
| parent | 8b97dc367a9dce2c5f14c8012ac1025c3ec70121 (diff) | |
| download | git-34af1d6e879c172ed670d8e94ce107cf120a8c74.tar.xz | |
Merge branch 'lo/repo-leftover-bits'
Clean-up the code around "git repo info" command.
* lo/repo-leftover-bits:
Documentation/git-repo: capitalize format descriptions
Documentation/git-repo: replace 'NUL' with '_NUL_'
t1901: adjust nul format output instead of expected value
t1900: rename t1900-repo to t1900-repo-info
repo: rename struct field to repo_info_field
repo: replace get_value_fn_for_key by get_repo_info_field
repo: rename repo_info_fields to repo_info_field
CodingGuidelines: instruct to name arrays in singular
Diffstat (limited to 'Documentation/CodingGuidelines')
| -rw-r--r-- | Documentation/CodingGuidelines | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index bec200428f..b8670751f5 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -668,6 +668,19 @@ For C programs: unsigned other_field:1; unsigned field_with_longer_name:1; + - Array names should be named in the singular form if the individual items are + subject of use. E.g.: + + char *dog[] = ...; + walk_dog(dog[0]); + walk_dog(dog[1]); + + Cases where the array is employed as a whole rather than as its unit parts, + the plural forms is preferable. E.g: + + char *dogs[] = ...; + walk_all_dogs(dogs); + For Perl programs: - Most of the C guidelines above apply. |
