Skip to content

Commit 9b40f43

Browse files
committed
Merge tag 'v1.8.1'
2 parents 2ecf339 + 36f7e21 commit 9b40f43

File tree

695 files changed

+73776
-27077
lines changed

Some content is hidden

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

695 files changed

+73776
-27077
lines changed

.clang-format

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# This file is an example configuration for clang-format 5.0.
2+
#
3+
# Note that this style definition should only be understood as a hint
4+
# for writing new code. The rules are still work-in-progress and does
5+
# not yet exactly match the style we have in the existing code.
6+
7+
# C Language specifics
8+
Language: Cpp
9+
10+
# Use tabs whenever we need to fill whitespace that spans at least from one tab
11+
# stop to the next one.
12+
#
13+
# These settings are mirrored in .editorconfig. Keep them in sync.
14+
UseTab: ForIndentation
15+
TabWidth: 8
16+
IndentWidth: 8
17+
ContinuationIndentWidth: 8
18+
ColumnLimit: 80
19+
20+
AlignAfterOpenBracket: AlwaysBreak
21+
AlignEscapedNewlines: Left
22+
AlignTrailingComments: false
23+
24+
# Allow putting parameters onto the next line
25+
AllowAllArgumentsOnNextLine: false
26+
AllowAllParametersOfDeclarationOnNextLine: false
27+
28+
# Don't allow short braced statements to be on a single line
29+
# if (a) not if (a) return;
30+
# return;
31+
AllowShortBlocksOnASingleLine: false
32+
AllowShortFunctionsOnASingleLine: None
33+
AllowShortLoopsOnASingleLine: false
34+
AllowShortLambdasOnASingleLine: None
35+
36+
# Pack as many parameters or arguments onto the same line as possible
37+
# int myFunction(int aaaaaaaaaaaa, int bbbbbbbb,
38+
# int cccc);
39+
BinPackArguments: true
40+
BinPackParameters: false
41+
42+
BreakBeforeBraces: Linux
43+
BreakBeforeBinaryOperators: None
44+
BreakBeforeTernaryOperators: false
45+
BreakStringLiterals: false
46+
47+
# The number of spaces before trailing line comments (// - comments).
48+
# This does not affect trailing block comments (/* - comments).
49+
SpacesBeforeTrailingComments: 1
50+
51+
# Don't insert spaces in casts
52+
# x = (int32) y; not x = ( int32 ) y;
53+
SpacesInCStyleCastParentheses: false
54+
55+
# Don't insert spaces inside container literals
56+
# var arr = [1, 2, 3]; not var arr = [ 1, 2, 3 ];
57+
SpacesInContainerLiterals: false
58+
59+
# Don't insert spaces after '(' or before ')'
60+
# f(arg); not f( arg );
61+
SpacesInParentheses: false
62+
63+
# Don't insert spaces after '[' or before ']'
64+
# int a[5]; not int a[ 5 ];
65+
SpacesInSquareBrackets: false
66+
67+
# Insert a space after '{' and before '}' in struct initializers
68+
Cpp11BracedListStyle: false
69+
70+
# A list of macros that should be interpreted as foreach loops instead of as
71+
# function calls.
72+
ForEachMacros:
73+
- 'git_array_foreach'
74+
- 'git_vector_foreach'
75+
76+
# The maximum number of consecutive empty lines to keep.
77+
MaxEmptyLinesToKeep: 1
78+
79+
# No empty line at the start of a block.
80+
KeepEmptyLinesAtTheStartOfBlocks: false
81+
82+
# Penalties
83+
# This decides what order things should be done if a line is too long
84+
PenaltyBreakAssignment: 10
85+
PenaltyBreakBeforeFirstCallParameter: 30
86+
PenaltyBreakComment: 10
87+
PenaltyBreakFirstLessLess: 0
88+
PenaltyBreakString: 10
89+
PenaltyExcessCharacter: 100
90+
PenaltyReturnTypeOnItsOwnLine: 60
91+
92+
SortIncludes: false

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"postCreateCommand": "bash .devcontainer/setup.sh"
3+
}

.devcontainer/setup.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
set -e
3+
4+
sudo apt-get update
5+
sudo apt-get -y --no-install-recommends install cmake
6+
7+
mkdir build
8+
cd build
9+
cmake ..

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
* text=auto
2+
ci/**/*.sh text eol=lf
3+
script/**/*.sh text eol=lf
4+
tests/resources/** linguist-vendored

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
build/
1+
/build/
22
.DS_Store
33
*~
44
.*.swp
5-
tags
5+
/tags
66
CMakeSettings.json
77
.vs
8+
.idea

.vscode/launch.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "(gdb) Launch",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/build/libgit2_tests",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${fileDirname}",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "gdb",
18+
"setupCommands": [
19+
{
20+
"description": "Enable pretty-printing for gdb",
21+
"text": "-enable-pretty-printing",
22+
"ignoreFailures": true
23+
}
24+
]
25+
}
26+
]
27+
}

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build",
8+
"type": "shell",
9+
"command": "cd build && cmake --build . --parallel",
10+
"group": "build",
11+
"presentation": {
12+
"reveal": "always",
13+
"panel": "new"
14+
}
15+
},
16+
{
17+
"label": "Run Tests",
18+
"type": "shell",
19+
"command": "build/libgit2_tests -v",
20+
"group": "test",
21+
"presentation": {
22+
"reveal": "always",
23+
"panel": "new"
24+
}
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)