git/contrib/scalar
Victoria Dye 435a2535b7 scalar-diagnose: move 'get_disk_info()' to 'compat/'
Move 'get_disk_info()' function into 'compat/'. Although Scalar-specific
code is generally not part of the main Git tree, 'get_disk_info()' will be
used in subsequent patches by additional callers beyond 'scalar diagnose'.
This patch prepares for that change, at which point this platform-specific
code should be part of 'compat/' as a matter of convention.

The function is copied *mostly* verbatim, with two exceptions:

* '#ifdef WIN32' is replaced with '#ifdef GIT_WINDOWS_NATIVE' to allow
  'statvfs' to be used with Cygwin.
* the 'struct strbuf buf' and 'int res' (as well as their corresponding
  cleanup & return) are moved outside of the '#ifdef' block.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-12 13:20:02 -07:00
..
t scalar-diagnose: use "$GIT_UNZIP" in test 2022-08-12 13:20:02 -07:00
.gitignore scalar: create a rudimentary executable 2021-12-04 21:52:23 -08:00
Makefile contrib/scalar: fix 'all' target in Makefile 2022-04-06 10:19:57 -07:00
scalar.c scalar-diagnose: move 'get_disk_info()' to 'compat/' 2022-08-12 13:20:02 -07:00
scalar.txt scalar: reword command documentation to clarify purpose 2022-07-18 11:03:56 -07:00