<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat/disk.h, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-08-12T20:20:02Z</updated>
<entry>
<title>scalar-diagnose: move 'get_disk_info()' to 'compat/'</title>
<updated>2022-08-12T20:20:02Z</updated>
<author>
<name>Victoria Dye</name>
<email>vdye@github.com</email>
</author>
<published>2022-08-12T20:10:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=435a2535b72aa0e3a2e152841fe79c5b65a6e8c0'/>
<id>urn:sha1:435a2535b72aa0e3a2e152841fe79c5b65a6e8c0</id>
<content type='text'>
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 &amp; return) are moved outside of the '#ifdef' block.

Signed-off-by: Victoria Dye &lt;vdye@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
