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

Re: git reveals a bug in (some versions) BSD diff

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 12, 2005, 16:04 UTC
Message-ID
<Pine.LNX.4.63.0508121801310.26333@wgmdd8.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vd5ojxiny.fsf@assigned-by-dhcp.cox.net>
Hi,
On Fri, 12 Aug 2005, Junio C Hamano wrote:
Show 16 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > Note the missing "\ No newline at end of file". The same happens on 
> > sourceforge's compile farm's OS 10.1 server, but not on its OS 10.2 
> > server.
> >
> > How to go about that? Silently ignore the missing line in apply.c? Force 
> > users to update their diff to a sane version?
> 
> Hmph.  We could tackle this two ways.  We probably _could_
> special case the trailing newline case if this problem is
> widespread, but a more general solution would be to teach
> git-apply '--fuzz'.  On the other hand, we could configure to
> use gdiff (or whatever GNU diff is called on those hosts with
> broken diff command) at the build time.  Probably it would be
> the bast to have an explicit option --fuzz to git-apply.

I'd prefer to deprecate that diff program by telling so in the test. Something along the lines "blabla. If this fails, chances are you have a borked diff. Try GNU diff..."

Ciao, Dscho

BTW: On my system, gdiff does not exist.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “git reveals a bug in (some versions) BSD diff”
  1. Johannes SchindelinAug 12, 2005
  2. Junio C HamanoAug 12, 2005
  3. Johannes SchindelinAug 12, 2005
  4. Junio C HamanoAug 12, 2005

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.