File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 287
287
288
288
# The code is not formatted correctly.
289
289
290
+ if hash colordiff 2> /dev/null; then
291
+ colordiff < " $patch "
292
+ else
293
+ echo " ${b} (Install colordiff to see this diff in color!)${n} "
294
+ echo
295
+ cat " $patch "
296
+ fi
297
+ echo
298
+
290
299
interactive=$( cd " $top_dir " && git config --bool hooks.clangFormatDiffInteractive)
291
300
if [ " $interactive " != false ]; then
292
301
# Interactive is the default, so anything that is not false is converted to
@@ -305,22 +314,13 @@ if [ "$interactive" = false ]; then
305
314
exit 1
306
315
fi
307
316
308
- if hash colordiff 2> /dev/null; then
309
- colordiff < " $patch "
310
- else
311
- echo " ${b} (Install colordiff to see this diff in color!)${n} "
312
- echo
313
- cat " $patch "
314
- fi
315
-
316
317
# We don't want to suggest applying clang-format after merge resolution
317
318
if git rev-parse MERGE_HEAD > /dev/null 2>&1 ; then
318
319
readonly this_is_a_merge=true
319
320
else
320
321
readonly this_is_a_merge=false
321
322
fi
322
323
323
- echo
324
324
echo " ${b} The staged content is not formatted correctly.${n} "
325
325
echo " The fix shown above can be applied automatically to the commit."
326
326
echo
You can’t perform that action at this time.
0 commit comments