git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH][Outreachy] remove all the inclusions of git-compat-util.h in header files

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 9, 2018, 10:13 UTC
Message-ID
<xmqqd0sjpgw1.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<b1824db3-1c0d-6851-2f5a-800cc88ee50f@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 13 quoted lines
> On 10/8/2018 1:05 PM, Ananya Krishna Maram wrote:
>> Hi All,
> Hello, Ananya! Welcome.
>
>> I was searching through #leftovers and found this.
>> https://public-inbox.org/git/CABPp-BGVVXcbZX44er6TO-PUsfEN_6GNYJ1U5cuoN9deaA48OQ@mail.gmail.com/
>>
>> This patch address the task discussed in the above link.
> The discussion above seems to not be intended for your commit message,
> but it does show up when I run `git am` and provide your email as
> input. The typical way to avoid this is to place all commentary below
> the "---" 
> that signifies the commit message is over.
Show 23 quoted lines
>> From: Ananya Krishan Maram <ananyakittu1997@gmail.com>
>>
>> skip the #include of git-compat-util.h since all .c files include it.
>>
>> Signed-off-by: Ananya Krishna Maram <ananyakittu1997@gmail.com>
>> ---
>>   advice.h             | 1 -
>>   commit-graph.h       | 1 -
>>   hash.h               | 1 -
>>   pkt-line.h           | 1 -
>>   t/helper/test-tool.h | 1 -
>>   5 files changed, 5 deletions(-)
>>
>> diff --git a/advice.h b/advice.h
>> index ab24df0fd..09148baa6 100644
>> --- a/advice.h
>> +++ b/advice.h
>> @@ -1,7 +1,6 @@
>>   #ifndef ADVICE_H
>>   #define ADVICE_H
>>   -#include "git-compat-util.h"
>>     extern int advice_push_update_rejected;
>>   extern int advice_push_non_ff_current;

The way I read the original discussion is "C source that includes compat-util.h shouldn't if it already includes cache.h"; advice.h is not C and does not (should not) include cache.h.

The "left over bits" should not be blindly trusted, and besides, Elijah punted to examine and think about each case and left it to others, so whoever is picking it up should do the thinking, not a blind conversion. I am not getting a feeling that this patch was done with careful thinking after checking only this one.

Previous: Ananya Krishna MaramNext: Johannes Schindelin
Message 4 of 8 in “[Outreachy] remove all the inclusions of git-compat-util.h in header files”
  1. [Outreachy] remove all the inclusions of git-compat-util.h in header filesAnanya Krishna Maram, Oct 8, 2018
  2. Derrick StoleeOct 8, 2018
  3. Ananya Krishna MaramOct 9, 2018
  4. Junio C HamanoOct 9, 2018
  5. Johannes SchindelinOct 10, 2018
  6. Junio C HamanoOct 10, 2018
  7. Christian CouderOct 10, 2018
  8. Junio C HamanoOct 10, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.