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

Re: Bug in git-diff output

From
Jeff King <peff@peff.net>
Date
Apr 1, 2014, 11:46 UTC
Message-ID
<20140401114621.GB15549@sigill.intra.peff.net>
In-Reply-To
<CALgQ2n-vPK6_0LnWA_AAD2GLvepjLN4A3UZFCAWzEp9r_=XOVg@mail.gmail.com>
On Tue, Apr 01, 2014 at 12:49:00PM +0200, rocketscienc01100101 . wrote:
> I tried to get a diff between HEAD and the current version of my
> project, so I did "git diff".

That actually diffs between the index and the working tree, but if you haven't used "git add" to add any changes, the index content is the same as HEAD.

Show 11 quoted lines
> It's a web project with a CSS file that contains the following CSS rule:
> 
> a[href^=tel] {
>     color:inherit;
>     text-decoration:none;
> }
> 
> Now, whenever I do "git diff", it will always show the a[href^=tel]
> part and mess up the output, even when I didn't change anything near
> that line. The problem is easily reproducable in a newly created
> repository.

I don't understand what you mean here by "mess up the output". Can you show us an example (and tell us what you expected to see)?

-Peff
Previous: rocketscienc01100101 .Next: rocketscienc01100101 .
Message 2 of 6 in “Bug in git-diff output”
  1. rocketscienc01100101 .Apr 1, 2014
  2. Jeff KingApr 1, 2014
  3. rocketscienc01100101 .Apr 2, 2014
  4. rocketscienc01100101 .Apr 2, 2014
  5. Matthieu MoyApr 2, 2014
  6. Junio C HamanoApr 3, 2014

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.