diff mbox series

[v2] bugreport: drop extraneous includes

Message ID 20200427234231.194456-1-emilyshaffer@google.com (mailing list archive)
State New, archived
Headers show
Series [v2] bugreport: drop extraneous includes | expand

Commit Message

Emily Shaffer April 27, 2020, 11:42 p.m. UTC
In the generic parts of the source files, system headers like <time.h>
and <stdio.h> are supposed to be included indirectly bt including
"git-compat-util.h", which manages portability issues.

Drop our explicit inclusions and rely on "cache.h", which includes
"git-compat-util.h".

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
---
 bugreport.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jonathan Nieder April 27, 2020, 11:46 p.m. UTC | #1
Emily Shaffer wrote:

> In the generic parts of the source files, system headers like <time.h>
> and <stdio.h> are supposed to be included indirectly bt including

s/bt/by/

> "git-compat-util.h", which manages portability issues.
>
> Drop our explicit inclusions and rely on "cache.h", which includes
> "git-compat-util.h".
>
> Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
> ---
>  bugreport.c | 2 --
>  1 file changed, 2 deletions(-)

With that tweak,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.
diff mbox series

Patch

diff --git a/bugreport.c b/bugreport.c
index 089b939a87..acacca8fef 100644
--- a/bugreport.c
+++ b/bugreport.c
@@ -1,8 +1,6 @@ 
 #include "cache.h"
 #include "parse-options.h"
-#include "stdio.h"
 #include "strbuf.h"
-#include "time.h"
 #include "help.h"
 #include "compat/compiler.h"