aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/git-hooks/commit-msg
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-07-27 14:27:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-07-27 18:08:38 -0700
commit9e4a6101f239b8168144078edd04843dea4dc69f (patch)
treebf88cc241a68119b3f83452b3ef2862283b7367f /scripts/git-hooks/commit-msg
parentmaint: avoid recent syntax-check issues (diff)
downloadcoreutils-9e4a6101f239b8168144078edd04843dea4dc69f.tar.gz
coreutils-9e4a6101f239b8168144078edd04843dea4dc69f.zip
ls: compute defaults more lazily
* src/ls.c (enum time_type, enum sort_type, enum indicator_style) (enum Dereference_symlink, ignore_mode): Put ‘= 0’ after default values, since the code relies on static storage defaulting to zero. (enum sort_type): Reorder so that -1 can be used to represent unset. (main): Test print_with_color after parse_ls_color may have reset it. (decode_line_length): Return the line length instead of setting static storage. All uses changed. Treat line lengths exceeding PTRDIFF_MAX as infinite, to avoid pointer-subtraction glitches. (stdout_isatty): New function, to avoid calling isatty twice. (decode_switches): Calculate defaults more lazily, to avoid using syscalls or getenv during startup unless the results are more likely to be needed. Use -1 to indicate options that haven’t been set on the command line yet. Move print_with_color test from here to ‘main’. Suppress bogus GCC warning. (getenv_quoting_style): Return the quoting style instead of setting static storage. (init_column_info): New arg MAX_COLS, to avoid recalculating it. Caller changed.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions