[PATCH] revision.h: add includes of "diff.h" and "commit.h"

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] revision.h: add includes of "diff.h" and "commit.h"

From: Christian Couder <hidden>
Date: 2016-06-15 22:46:33

Because they are needed by some features included in
"revision.h".

This makes the following just work:

        $ cat >1.c <<\EOF
        #include "cache.h"
        #include "revision.h"
        EOF
        $ cc -Wall -DSHA1_HEADER='<openssl/sha.h>' -c 1.c

Signed-off-by: Christian Couder <redacted>
---
 revision.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/revision.h b/revision.h
index 5adfc91..495d7eb 100644
--- a/revision.h
+++ b/revision.h
@@ -3,6 +3,8 @@
 
 #include "parse-options.h"
 #include "grep.h"
+#include "diff.h"
+#include "commit.h"
 
 #define SEEN		(1u<<0)
 #define UNINTERESTING   (1u<<1)
-- 
1.6.2.1.530.g516a7.dirty

Re: [PATCH] revision.h: add includes of "diff.h" and "commit.h"

From: Nanako Shiraishi <hidden>
Date: 2016-06-15 22:46:33

Quoting Christian Couder [off-list ref]:
Because they are needed by some features included in
"revision.h".

This makes the following just work:

        $ cat >1.c <<\EOF
        #include "cache.h"
        #include "revision.h"
        EOF
        $ cc -Wall -DSHA1_HEADER='<openssl/sha.h>' -c 1.c
I'm sorry if this is obvious to experienced people, but I don't understand what benefit there is to make such an empty program compilable.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help