summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-27 18:33:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-27 18:33:53 (GMT)
commit2b0f6b1c187742ec6719478a01885ad902456f84 (patch)
tree027e967241308d54854408b9780e20a3c1afca91 /Documentation
parent2ac76d8d9dccaaecf3c01845d0f7c1808c75722b (diff)
parent89a9f2c862db52d99e4dd78e799f4b36dac597ac (diff)
downloadgit-2b0f6b1c187742ec6719478a01885ad902456f84.zip
git-2b0f6b1c187742ec6719478a01885ad902456f84.tar.gz
git-2b0f6b1c187742ec6719478a01885ad902456f84.tar.bz2
Merge branch 'jk/doc-do-not-write-extern'
Devdoc update. * jk/doc-do-not-write-extern: CodingGuidelines: mention "static" and "extern"
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/CodingGuidelines5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index c4cb5ff..48aa4ed 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -386,6 +386,11 @@ For C programs:
- Use Git's gettext wrappers to make the user interface
translatable. See "Marking strings for translation" in po/README.
+ - Variables and functions local to a given source file should be marked
+ with "static". Variables that are visible to other source files
+ must be declared with "extern" in header files. However, function
+ declarations should not use "extern", as that is already the default.
+
For Perl programs:
- Most of the C guidelines above apply.