File tree Expand file tree Collapse file tree 3 files changed +56
-12
lines changed Expand file tree Collapse file tree 3 files changed +56
-12
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ the overall style of existing code. Modifications to existing
43
43
code is expected to match the style the surrounding code already
44
44
uses (even if it doesn't match the overall style of existing code).
45
45
46
- But if you must have a list of rules, here they are.
46
+ But if you must have a list of rules, here are some language
47
+ specific ones. Note that Documentation/ToolsForGit.txt document
48
+ has a collection of tips to help you use some external tools
49
+ to conform to these guidelines.
47
50
48
51
For shell scripts specifically (not exhaustive):
49
52
@@ -492,17 +495,6 @@ For Perl programs:
492
495
493
496
- Learn and use Git.pm if you need that functionality.
494
497
495
- - For Emacs, it's useful to put the following in
496
- GIT_CHECKOUT/.dir-locals.el, assuming you use cperl-mode:
497
-
498
- ;; note the first part is useful for C editing, too
499
- ((nil . ((indent-tabs-mode . t)
500
- (tab-width . 8)
501
- (fill-column . 80)))
502
- (cperl-mode . ((cperl-indent-level . 8)
503
- (cperl-extra-newline-before-brace . nil)
504
- (cperl-merge-trailing-else . t))))
505
-
506
498
For Python scripts:
507
499
508
500
- We follow PEP-8 (http://www.python.org/dev/peps/pep-0008/).
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ SP_ARTICLES += $(API_DOCS)
93
93
TECH_DOCS += MyFirstContribution
94
94
TECH_DOCS += MyFirstObjectWalk
95
95
TECH_DOCS += SubmittingPatches
96
+ TECH_DOCS += ToolsForGit
96
97
TECH_DOCS += technical/bundle-format
97
98
TECH_DOCS += technical/hash-function-transition
98
99
TECH_DOCS += technical/http-protocol
Original file line number Diff line number Diff line change
1
+ Tools for developing Git
2
+ ========================
3
+ :sectanchors:
4
+
5
+ [[summary]]
6
+ == Summary
7
+
8
+ This document gathers tips, scripts and configuration file to help people
9
+ working on Git's codebase use their favorite tools while following Git's
10
+ coding style.
11
+
12
+ [[author]]
13
+ === Author
14
+
15
+ The Git community.
16
+
17
+ [[table_of_contents]]
18
+ == Table of contents
19
+
20
+ - <<vscode>>
21
+ - <<emacs>>
22
+
23
+ [[vscode]]
24
+ === Visual Studio Code (VS Code)
25
+
26
+ The contrib/vscode/init.sh script creates configuration files that enable
27
+ several valuable VS Code features. See contrib/vscode/README.md for more
28
+ information on using the script.
29
+
30
+ [[emacs]]
31
+ === Emacs
32
+
33
+ This is adapted from Linux's suggestion in its CodingStyle document:
34
+
35
+ - To follow rules of the CodingGuideline, it's useful to put the following in
36
+ GIT_CHECKOUT/.dir-locals.el, assuming you use cperl-mode:
37
+ ----
38
+ ;; note the first part is useful for C editing, too
39
+ ((nil . ((indent-tabs-mode . t)
40
+ (tab-width . 8)
41
+ (fill-column . 80)))
42
+ (cperl-mode . ((cperl-indent-level . 8)
43
+ (cperl-extra-newline-before-brace . nil)
44
+ (cperl-merge-trailing-else . t))))
45
+ ----
46
+
47
+ For a more complete setup, since Git's codebase uses a coding style
48
+ similar to the Linux kernel's style, tips given in Linux's CodingStyle
49
+ document can be applied here too.
50
+
51
+ ==== https://www.kernel.org/doc/html/v4.10/process/coding-style.html#you-ve-made-a-mess-of-it
You can’t perform that action at this time.
0 commit comments