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

Re: Bug in git-diff output

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Apr 2, 2014, 12:09 UTC
Message-ID
<vpqmwg4c4q8.fsf@anie.imag.fr>
In-Reply-To
<CALgQ2n9VXVpqXe1NQO4+b-Ngmbhxnza52GJqr81t_ubLfjY75g@mail.gmail.com>
"rocketscienc01100101 ." <rocketscienc01100101@gmail.com> writes:
> http://i.imgur.com/BoJSjm9.png
>
> Here's a screenshot that shows the problem.
(better cut-and-paste the text than sending a PNG image)
> There's always a misplaced line in the output (most of the time
> a[href^=tel] { }), no matter where in the file the changes are.

The part after the @@ are ignored by patch tools. They are here just for convenience. They are a guess of what the patch hunk belongs to. For C/Java/Ada/... programs, it's the function name. Git does not know about CSS syntax, so it guesses wrong (last line starting with a letter I guess, not sure exactly what happens when Git doesn't know the syntax).

But don't worry, these are juste hints for human, they are harmless.
> Sometimes it's even in the wrong position, above the @@ numbers.
That is strange. Do you have a way to reproduce this?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: rocketscienc01100101 .Next: Junio C Hamano
Message 5 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.