[PATCH] commit-reach: correct accidental #include of C file
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 28, 2018, 21:36 UTC
- Message-ID
- <20180828213657.GA74296@aiede.svl.corp.google.com>
- In-Reply-To
- <20180828212457.GA74687@aiede.svl.corp.google.com>
Without this change, the build breaks with clang:
libgit/ref-filter.pic.o: multiple definition of 'filter_refs' libgit/commit-reach.pic.o: previous definition here
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- Jonathan Nieder wrote:
> Derrick Stolee wrote:
Show 16 quoted lines
>> --- a/commit-reach.c >> +++ b/commit-reach.c >> @@ -1,8 +1,10 @@ >> #include "cache.h" >> #include "commit.h" >> +#include "commit-graph.h" >> #include "decorate.h" >> #include "prio-queue.h" >> #include "tree.h" >> +#include "ref-filter.c" > > Did you mean "ref-filter.h"? > > This broke the build here. Is there some check that we can use to > prevent it happening again? I don't think we ever intentionally > #include a .c file.
Here's what I'm applying locally.
Thanks, Jonathan
commit-reach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commit-reach.c b/commit-reach.c index c996524032..86715c103c 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -4,7 +4,7 @@ #include "decorate.h" #include "prio-queue.h" #include "tree.h" -#include "ref-filter.c" +#include "ref-filter.h" #include "revision.h" #include "tag.h" #include "commit-reach.h"
-- 2.19.0.rc0.228.g281dcd1b4d0