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

Re: [PATCH 1/2] git apply: option to ignore whitespace differences

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 2, 2009, 18:29 UTC
Message-ID
<7vocs36irw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<cb7bb73a0907021046x7fcb921bs86d55b69de540c9d@mail.gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
Show 15 quoted lines
> On Thu, Jul 2, 2009 at 6:46 PM, Junio C Hamano<gitster@pobox.com> wrote:
>>> diff --git a/builtin-apply.c b/builtin-apply.c
>>> index dc0ff5e..86860d6 100644
>>> --- a/builtin-apply.c
>>> +++ b/builtin-apply.c
>>> @@ -39,6 +39,7 @@ static int diffstat;
>>>  static int numstat;
>>>  static int summary;
>>>  static int check;
>>> +static int ignore_whitespace = 0;
>>
>> s/ = 0//;
>
> Ah, I wondered about that. I assume this leaves no possibility for
> uninitialized values because of the way option parsing is done?
It is not "uninitialized" to begin with.
C initializes static variables without explicit initial values to 0.
Previous: Giuseppe Bilotta
Message 6 of 6 in “git apply: cope with whitespace differences”
  1. 0/2 git apply: cope with whitespace differencesGiuseppe Bilotta, Jul 2, 2009
  2. 1/2 git apply: option to ignore whitespace differencesGiuseppe Bilotta, Jul 2, 2009
  3. 2/2 git apply: preserve original whitespace with --ignore-whitespaceGiuseppe Bilotta, Jul 2, 2009
  4. Junio C HamanoJul 2, 2009
  5. Giuseppe BilottaJul 2, 2009
  6. Junio C HamanoJul 2, 2009

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.