Create an extras directory with files that are not related to the build but that I need to keep around for reference.

This commit is contained in:
Zed A. Shaw 2024-05-11 06:16:15 -04:00
parent ccf37e758c
commit 8b61f7b86b
5 changed files with 297 additions and 11 deletions

View file

@ -53,16 +53,29 @@ thing that failed on the build was `libgit2/src/utils/process.h` had several err
missing types. To keep this description short here's the patch I crafted that solved the problem:
```diff
10a11,12
> typedef struct git_str git_str;
>
115,118c117
< GIT_INLINE(bool) git_process__is_cmdline_option(const char *str)
< {
< return (str && str[0] == '-');
< }
---
> #define git_process__is_cmdline_option(str) ((str) && (str[0]) == '-')
--- subprojects/libgit2-1.8.0/src/util/process.h 2024-03-20 16:19:37.000000000 -0400
+++ process.h 2024-05-09 08:05:48.279986200 -0400
@@ -8,6 +8,8 @@
#ifndef INCLUDE_process_h__
#define INCLUDE_process_h__
+typedef struct git_str git_str;
+
typedef struct git_process git_process;
typedef struct {
@@ -112,10 +114,7 @@
* cmdline arguments to ensure that they are not erroneously treated
* as an option. For example, arguments to `ssh`.
*/
-GIT_INLINE(bool) git_process__is_cmdline_option(const char *str)
-{
- return (str && str[0] == '-');
-}
+#define git_process__is_cmdline_option(str) ((str) && (str[0]) == '-')
/**
* Start the process.
```
What's even stranger is that the compilation errors _only_ showed up when I included any C++
@ -83,7 +96,7 @@ int main(int argc, char *argv[])
}
```
What's wile is do you see how I have a `test_libgit2` function and I'm including a `libgit2-test.h`
What's wild is do you see how I have a `test_libgit2` function and I'm including a `libgit2-test.h`
file? I even went so far as to place all of the `libgit2` code into a separate compilation unit to
firewall it off and the bug _STILL_ showed up. That `libgit2-test.h` header had absolutely zero
`libgit2` headers or definitions. It only had the one `test_libgit2` function in it.