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

Re: git diff woes

From
Andreas Ericsson <ae@op5.se>
Date
Nov 13, 2007, 07:40 UTC
Message-ID
<473954F8.8070908@op5.se>
In-Reply-To
<buomytin9dz.fsf@dhapc248.dev.necel.com>
Miles Bader wrote:
Show 8 quoted lines
> Andreas Ericsson <ae@op5.se> writes:
>> I notice it, and I don't like it. I guess I'm just used to git being
>> smarter than their GNU tool equivalents, especially since it only ever
>> applies patches in full.
> 
> It's not at all obvious that this behavior is actually wrong -- it seems
> perfectly reasonable to use either old or new text for the hunk headers.
> 
Right, which is why I've made it configurable.
Show 5 quoted lines
> It hardly matters really, since that particular output is just "useful
> noise" to provide a bit of helpful context for human readers, and humans
> (unlike programs) are notoriously good at not being bothered by such
> things.  Er, well most humans anyway.
> 

I wouldn't have reacted either, except that this time someone asked me to review a branch early in the morning because he had introduced a bug in the process, and the hunk header information made me assume the wrong hunk of the patch was the culprit.

On the one hand, it wouldn't have been so much of a problem if the developer in question would have followed my suggestion of committing small and making sure the commit message describes everything that's done. On the other hand, a tool fooling a human isn't a good thing either, even if said human is not really in shape for using said tool.

Granted, the new form can still fool people, but for archeology excursions I think it's definitely right to use the "new" funcname in the hunk header.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Miles BaderNext: Andreas Ericsson
Message 10 of 13 in “git diff woes”
  1. Andreas EricssonNov 12, 2007
  2. Johannes SchindelinNov 12, 2007
  3. Andreas EricssonNov 12, 2007
  4. Johannes SchindelinNov 12, 2007
  5. Andreas EricssonNov 12, 2007
  6. Junio C HamanoNov 12, 2007
  7. Andreas EricssonNov 13, 2007
  8. Johannes SchindelinNov 13, 2007
  9. Miles BaderNov 13, 2007
  10. Andreas EricssonNov 13, 2007
  11. diffcore: Allow users to decide what funcname to useAndreas Ericsson, Nov 13, 2007
  12. Jakub NarebskiNov 13, 2007
  13. Andreas EricssonNov 13, 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.