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

Re: Strange diff behavior?

From
JSJason Sewall <jasonsewall@gmail.com>
Date
Jun 21, 2007, 16:46 UTC
Message-ID
<31e9dd080706210946i4821f300o55e89b67b3be562@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0706211131160.4059@racer.site>

Ok, it was my bad. There *were* whitespaces on those lines, but in HEAD^, not head. Git only cares when they are introduced, not when they are removed. So git diff HEAD^..HEAD showed that strange line removal/add but git diff HEAD..HEAD^ shows me the whitespace.

I recently set up emacs to strip whitespace whenever I save a file to prevent git from complaining (and it's good practice anyway), so that explains why I didn't expect the change

Sorry about the mixup, and thanks for your help.
On 6/21/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 15 quoted lines
> Hi,
>
> On Thu, 21 Jun 2007, Raimund Bauer wrote:
>
> > On Thu, 2007-06-21 at 02:13 +0100, Johannes Schindelin wrote:
> >
> > > Just a guess: core.autocrlf=true?
> >
> > My guess: apply.whitespace=strip
>
> Much better guess, I guess. Jason?
>
> Ciao,
> Dscho
>
Previous: Johannes SchindelinNext: Matthias Lederhofer
Message 5 of 7 in “Strange diff behavior?”
  1. Jason SewallJun 21, 2007
  2. Johannes SchindelinJun 21, 2007
  3. Raimund BauerJun 21, 2007
  4. Johannes SchindelinJun 21, 2007
  5. Jason SewallJun 21, 2007
  6. Matthias LederhoferJun 21, 2007
  7. Jason SewallJun 21, 2007

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.