Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
5286198a
Commit
5286198a
authored
Jun 15, 2015
by
Gautier Pelloux-Prayer
Browse files
pre-commit: fix macosx version when files are deleted
parent
778fbca5
Changes
2
Hide whitespace changes
Inline
Side-by-side
.git-pre-commit
View file @
5286198a
...
...
@@ -22,7 +22,7 @@ function git-clang-format-diffing {
format_diff_options
=
"--style=file"
#only diffing commited files, ignored staged one
$format_diff
$format_diff_options
--diff
$(
git
--no-pager
diff
--cached
--name-
only
)
>
git-clang-format.diff
$format_diff
$format_diff_options
--diff
$(
git
--no-pager
diff
--cached
--name-
status
|
grep
-v
'^D'
|
cut
-f2
)
>
git-clang-format.diff
if
!
grep
-q
-E
'(no modified files to format|clang-format did not modify any files)'
git-clang-format.diff
;
then
invalid-format-detected
"git apply git-clang-format.diff"
"clang-format
$format_diff_options
-i <some_file.c>"
...
...
@@ -39,6 +39,7 @@ function clang-format-diff-diffing {
fi
}
set
-e
if
which git-clang-format &>/dev/null
;
then
git-clang-format-diffing
$@
elif
[
!
-z
"
$(
find /usr/bin/ /usr/local/bin/ /opt/bin/
-name
'clang-format-diff*'
-type
f 2>/dev/null
)
"
]
;
then
...
...
.gitignore
View file @
5286198a
...
...
@@ -46,3 +46,4 @@ tester/tmp_resolv.conf
tester/belle_sip_tester_crt
tester/CUnitAutomated-Results.xml.tmp-Results.xml
belle-sip-tests.log
git-clang-format.diff
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment