clar: stop including `shellapi.h` unnecessarily

The `shellapi.h` header was included as of https://github.com/clar-test/clar/commit/136e763211aa, to have `SHFileOperation()` declared so that it could be called. However, https://github.com/clar-test/clar/commit/5ce31b69b525 removed that call, and therefore that `#include <shellapi.h>` is unnecessary. It is also unwanted in Git because this project uses a subset of Git for Windows' SDK in its CI builds that (for bandwidth reasons) excludes tons of header files, including `shellapi.h`. So let's remove it. Note: Since the `windows.h` header would include `shellapi.h` anyway, we also define `WIN32_LEAN_AND_MEAN` to avoid this and similar other unnecessary includes before including `windows.h`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 4, 2024 at 16:16 UTC fe7066a9d97bb2546a717911bbda6c43bf02087a
1 file changed +1 -1
t/unit-tests/clar/clar.c
+1 -1
@@ -19,9 +19,9 @@
19 #include <sys/stat.h>
20
21 #ifdef _WIN32
22 +# define WIN32_LEAN_AND_MEAN
23 # include <windows.h>
24 # include <io.h>
24 -# include <shellapi.h>
25 # include <direct.h>
26
27 # define _MAIN_CC __cdecl