From: Linus Torvalds Date: Wed, 25 May 2005 18:08:54 GMT Subject: Re: change of git-diff-tree and symlinks Message-ID: In-Reply-To: <20050525111711.GA27492@vrfy.org> On Wed, 25 May 2005, Kay Sievers wrote: > > I'm catching up with gitweb.cgi to parse the changed output. Works fine > so far and is really much easier to parse. Here is something that does > not work anymore. See the difference between: > > http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commit;h=49cedafaf893bfe348eb7598227f1a11ae24bfd6 > http://ehlo.org/~kay/gitweb.cgi?p=linux/hotplug/udev.git;a=commit;h=49cedafaf893bfe348eb7598227f1a11ae24bfd6 Yes, the new diff-tree thing doesn't show symlinks. The problem seems to be that we just don't have a "status" flag for it. I think we should call it "T" for "Type change" or something, but in the meantime let's just have the rule that instead of ignoring unknown state changes, we always print them out as "?" instead. Ie something like this.. (And I'd suggest you make gitweb flexible enough that it does something sane if it sees an unknown reason code - let's see what Junio thinks about what status code we should use for this). Linus ---- diff --git a/diff.c b/diff.c --- a/diff.c +++ b/diff.c @@ -768,7 +768,7 @@ void diff_flush(int diff_output_style, i for (i = 0; i < q->nr; i++) { struct diff_filepair *p = q->queue[i]; if (p->status == 0) - continue; + p->status = '?'; switch (diff_output_style) { case DIFF_FORMAT_PATCH: diff_flush_patch(p);