Skip to content

Commit 55e40b8

Browse files
committed
Add .editorconfig
1 parent afe728a commit 55e40b8

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
max_line_length = 80
13+
indent_brace_style = 1TBS
14+
spaces_around_operators = true
15+
quote_type = auto
16+
17+
[package.json]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.md]
22+
trim_trailing_whitespace = false

dirty.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#!/usr/bin/env sh
22

33
if test -n "$(git status --porcelain)"; then
4-
echo 'Unclean working tree. Commit or stash changes first.' >&2;
5-
exit 128;
4+
echo 'Unclean working tree. Commit or stash changes first.' >&2;
5+
exit 128;
66
fi
77

88
if ! git fetch --quiet 2> /dev/null; then
9-
echo 'There was a problem fetching your branch.' >&2;
10-
exit 128;
9+
echo 'There was a problem fetching your branch.' >&2;
10+
exit 128;
1111
fi
1212

13-
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
13+
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
1414
BRANCH=${1:-$CURRENT_BRANCH}
15-
git branch --set-upstream-to=origin/$BRANCH $BRANCH > /dev/null
15+
git branch --set-upstream-to=origin/"$BRANCH" "$BRANCH" > /dev/null
1616

1717
if test "0" != "$(git rev-list --count --left-only @'{u}'...HEAD)"; then
18-
echo 'Remote history differ. Please pull changes.' >&2;
19-
exit 128;
18+
echo 'Remote history differ. Please pull changes.' >&2;
19+
exit 128;
2020
fi
2121

22-
git branch --unset-upstream
22+
git branch --unset-upstream

0 commit comments

Comments
 (0)