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 287287
288288# The code is not formatted correctly.
289289
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+
290299interactive=$( cd " $top_dir " && git config --bool hooks.clangFormatDiffInteractive)
291300if [ " $interactive " != false ]; then
292301 # Interactive is the default, so anything that is not false is converted to
@@ -305,22 +314,13 @@ if [ "$interactive" = false ]; then
305314 exit 1
306315fi
307316
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-
316317# We don't want to suggest applying clang-format after merge resolution
317318if git rev-parse MERGE_HEAD > /dev/null 2>&1 ; then
318319 readonly this_is_a_merge=true
319320else
320321 readonly this_is_a_merge=false
321322fi
322323
323- echo
324324echo " ${b} The staged content is not formatted correctly.${n} "
325325echo " The fix shown above can be applied automatically to the commit."
326326echo
You can’t perform that action at this time.
0 commit comments