Git development
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <junkio@cox.net>,
	Linus Torvalds <torvalds@osdl.org>,
	git@vger.kernel.org
Subject: Re: Implementing diff, was Re: git 0.99.7b doesn't build on Cygwin
Date: Sun, 25 Sep 2005 09:08:20 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.63.0509250854570.22725@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.63.0509251745160.17672@wgmdd8.biozentrum.uni-wuerzburg.de>

On Sun, 25 Sep 2005, Johannes Schindelin wrote:

>> Linus Torvalds <torvalds@osdl.org> writes:
>>
>>> The GNU diff sources are hard enough to read that I don't think we want to
>>> try to merge the unified diff generation from there.
>>
>> I was talking with GNU diff maintainer and his impression was
>> that CVS folks may have done enough libification -- I'll find
>> time to look at CVS code and see how much damage we are talking
>> about.
>
> I am not sure if it would be wise to completely do away with the current
> method: Often, I call git-diff with my own wdiff-helper. Also, options
> like "-b" to diff are very useful, and would have to be implemented, too.

What you'd have to do, if you chose to use diffutils stuff, is to 
transform the main() of diff in diff_main(), use setjmp/longjmp to capture 
its exit()s, and make it use a proper allocator (if you want to avoid 
leaks upon aborts). You can see an example inside the diff/libgdiff 
directory of this packages:

https://www.cvshome.org
http://www.opencm.org

In that way, instead of executing "diff -u ...", you'd call diff_main() 
with the proper args array. The CVS one (the other project seems dead, 
and they lifted the thing from CVS anyway) should be readily usable.


- Davide

  reply	other threads:[~2005-09-25 16:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 13:33 git 0.99.7b doesn't build on Cygwin Peter TB Brett
2005-09-23 13:44 ` Johannes Schindelin
2005-09-23 13:50   ` Peter TB Brett
2005-09-23 22:08     ` Martin Langhoff
2005-09-23 22:34       ` Petr Baudis
2005-09-24  0:09   ` Linus Torvalds
2005-09-24  0:43     ` Linus Torvalds
2005-09-25  7:52       ` Junio C Hamano
2005-09-25 15:47         ` Implementing diff, was " Johannes Schindelin
2005-09-25 16:08           ` Davide Libenzi [this message]
2005-09-25 17:00             ` Linus Torvalds
2005-09-25 19:16               ` Davide Libenzi
2005-09-24  1:13     ` Johannes Schindelin
2005-09-24  2:46       ` Linus Torvalds
2005-09-24  3:04         ` Junio C Hamano
2005-09-24  5:26         ` Davide Libenzi
2005-09-24 18:10           ` Linus Torvalds
2005-09-24 19:12             ` Davide Libenzi
2005-09-24 20:31               ` Junio C Hamano
2005-09-24 21:28                 ` Davide Libenzi
2005-09-24 21:46                   ` Junio C Hamano
2005-09-24 21:47                   ` Junio C Hamano
2005-09-24 21:52                     ` Davide Libenzi
2005-09-24 22:26                   ` Linus Torvalds
2005-09-24 22:27                     ` Linus Torvalds
2005-09-25 16:59                       ` Linus Torvalds
2005-09-26 19:33                       ` Jon Loeliger
2005-09-26 20:23                         ` Junio C Hamano
2005-09-24 22:41                     ` Davide Libenzi
2005-09-25 19:59                       ` Giuseppe Bilotta
2005-09-26  4:57                         ` Junio C Hamano
2005-09-26  5:05                         ` Davide Libenzi
2005-09-26 11:00                           ` Giuseppe Bilotta
2005-09-26 21:54                           ` H. Peter Anvin
2005-09-26 22:03                             ` Davide Libenzi
2005-09-26 22:15                               ` H. Peter Anvin
2005-09-25  3:04                 ` Daniel Barkalow
2005-09-24  5:11     ` Davide Libenzi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0509250854570.22725@localhost.localdomain \
    --to=davidel@xmailserver.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox