Skip to content

Commit eccd872

Browse files
committed
Merge tag 'v2.23.0-rc0' of git://git.kernel.org/pub/scm/git/git
Git 2.23-rc0 * tag 'v2.23.0-rc0' of git://git.kernel.org/pub/scm/git/git: (420 commits) Git 2.23-rc0 Merge fixes made on the 'master' front Flush fixes up to the third batch post 2.22.0 The seventh batch git: mark cmd_rebase as requiring a worktree rebase: fix white-space xdiff: clamp function context indices in post-image grep: print the pcre2_jit_on value t6200: use test_commit_bulk travis-ci: build with GCC 4.8 as well The sixth batch clean: show an error message when the path is too long CodingGuidelines: spell out post-C89 rules README: fix rendering of text in angle brackets rm: resolving by removal is not a warning-worthy event transport-helper: avoid var decl in for () loop control stash: fix handling removed files with --keep-index mingw: support spawning programs containing spaces in their names gpg-interface: do not scan past the end of buffer tests: defang pager tests by explicitly disabling the log.mailmap warning ...
2 parents 291ada2 + 026dd73 commit eccd872

File tree

400 files changed

+14772
-3656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+14772
-3656
lines changed

.clang-format

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,21 @@ SpacesInSquareBrackets: false
148148
Cpp11BracedListStyle: false
149149

150150
# A list of macros that should be interpreted as foreach loops instead of as
151-
# function calls.
152-
ForEachMacros: ['for_each_string_list_item', 'for_each_wanted_builtin', 'for_each_builtin', 'for_each_ut']
151+
# function calls. Taken from:
152+
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' \
153+
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
154+
# | sort | uniq
155+
ForEachMacros:
156+
- 'for_each_abbrev'
157+
- 'for_each_builtin'
158+
- 'for_each_string_list_item'
159+
- 'for_each_ut'
160+
- 'for_each_wanted_builtin'
161+
- 'list_for_each'
162+
- 'list_for_each_dir'
163+
- 'list_for_each_prev'
164+
- 'list_for_each_prev_safe'
165+
- 'list_for_each_safe'
153166

154167
# The maximum number of consecutive empty lines to keep.
155168
MaxEmptyLinesToKeep: 1

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.pl eof=lf diff=perl
66
*.pm eol=lf diff=perl
77
*.py eol=lf diff=python
8+
*.bat eol=crlf
89
/Documentation/**/*.txt eol=lf
910
/command-list.txt eol=lf
1011
/GIT-VERSION-GEN eol=lf

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
/git-difftool
5959
/git-difftool--helper
6060
/git-describe
61+
/git-env--helper
6162
/git-fast-export
6263
/git-fast-import
6364
/git-fetch
@@ -122,9 +123,6 @@
122123
/git-range-diff
123124
/git-read-tree
124125
/git-rebase
125-
/git-rebase--am
126-
/git-rebase--common
127-
/git-rebase--interactive
128126
/git-rebase--preserve-merges
129127
/git-receive-pack
130128
/git-reflog
@@ -142,6 +140,7 @@
142140
/git-request-pull
143141
/git-rerere
144142
/git-reset
143+
/git-restore
145144
/git-rev-list
146145
/git-rev-parse
147146
/git-revert
@@ -166,6 +165,7 @@
166165
/git-submodule
167166
/git-submodule--helper
168167
/git-svn
168+
/git-switch
169169
/git-symbolic-ref
170170
/git-tag
171171
/git-unpack-file
@@ -226,6 +226,11 @@
226226
*.user
227227
*.idb
228228
*.pdb
229+
*.ilk
230+
*.iobj
231+
*.ipdb
232+
*.dll
233+
.vs/
229234
/Debug/
230235
/Release/
231236
*.dSYM

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ matrix:
2121
compiler:
2222
addons:
2323
before_install:
24+
- env: jobname=linux-gcc-4.8
25+
os: linux
26+
dist: trusty
27+
compiler:
2428
- env: jobname=Linux32
2529
os: linux
2630
compiler:

Documentation/CodingGuidelines

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,30 @@ For C programs:
195195
by e.g. "echo DEVELOPER=1 >>config.mak".
196196

197197
- We try to support a wide range of C compilers to compile Git with,
198-
including old ones. That means that you should not use C99
199-
initializers, even if a lot of compilers grok it.
198+
including old ones. You should not use features from newer C
199+
standard, even if your compiler groks them.
200200

201-
- Variables have to be declared at the beginning of the block.
201+
There are a few exceptions to this guideline:
202+
203+
. since early 2012 with e1327023ea, we have been using an enum
204+
definition whose last element is followed by a comma. This, like
205+
an array initializer that ends with a trailing comma, can be used
206+
to reduce the patch noise when adding a new identifer at the end.
207+
208+
. since mid 2017 with cbc0f81d, we have been using designated
209+
initializers for struct (e.g. "struct t v = { .val = 'a' };").
210+
211+
. since mid 2017 with 512f41cf, we have been using designated
212+
initializers for array (e.g. "int array[10] = { [5] = 2 }").
213+
214+
These used to be forbidden, but we have not heard any breakage
215+
report, and they are assumed to be safe.
216+
217+
- Variables have to be declared at the beginning of the block, before
218+
the first statement (i.e. -Wdeclaration-after-statement).
219+
220+
- Declaring a variable in the for loop "for (int i = 0; i < 10; i++)"
221+
is still not allowed in this codebase.
202222

203223
- NULL pointers shall be written as NULL, not as 0.
204224

@@ -412,6 +432,12 @@ For C programs:
412432
must be declared with "extern" in header files. However, function
413433
declarations should not use "extern", as that is already the default.
414434

435+
- You can launch gdb around your program using the shorthand GIT_DEBUGGER.
436+
Run `GIT_DEBUGGER=1 ./bin-wrappers/git foo` to simply use gdb as is, or
437+
run `GIT_DEBUGGER="<debugger> <debugger-args>" ./bin-wrappers/git foo` to
438+
use your own debugger and arguments. Example: `GIT_DEBUGGER="ddd --gdb"
439+
./bin-wrappers/git log` (See `wrap-for-bin.sh`.)
440+
415441
For Perl programs:
416442

417443
- Most of the C guidelines above apply.

Documentation/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ SP_ARTICLES += howto/maintain-git
7676
API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt)))
7777
SP_ARTICLES += $(API_DOCS)
7878

79+
TECH_DOCS += MyFirstContribution
7980
TECH_DOCS += SubmittingPatches
8081
TECH_DOCS += technical/hash-function-transition
8182
TECH_DOCS += technical/http-protocol

0 commit comments

Comments
 (0)