From 1509bd9e69b916ca7f04a89fc03662e03e2ba312 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Fri, 24 Feb 2006 21:57:51 +0530 Subject: [PATCH 1/2] gitview: Fix the graph display . This fix all the known issue with the graph display The bug need to be explained graphically | a This line need not be there ---->| \ b | | / c c is parent of a and all a,b and c are placed on the same line and b is child of c With my last checkin I added a seperate line to indicate that a is connected to c. But then we had the line connecting a and b which should not be ther. This changes fixes the same bug Signed-off-by: Aneesh Kumar K.V Signed-off-by: Junio C Hamano --- contrib/gitview/gitview | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index 2cde71e30d..4e3847d8bf 100755 --- a/contrib/gitview/gitview +++ b/contrib/gitview/gitview @@ -938,8 +938,10 @@ class GitView: def draw_incomplete_line(self, sha1, node_pos, out_line, in_line, index): for idx, pos in enumerate(self.incomplete_line[sha1]): if(pos == node_pos): - out_line.append((pos, - pos+0.5, self.colours[sha1])) + #remove the straight line and add a slash + if ((pos, pos, self.colours[sha1]) in out_line): + out_line.remove((pos, pos, self.colours[sha1])) + out_line.append((pos, pos+0.5, self.colours[sha1])) self.incomplete_line[sha1][idx] = pos = pos+0.5 try: next_commit = self.commits[index+1] From 8fcf1ad9c68e15d881194c8544e7c11d33529c2b Mon Sep 17 00:00:00 2001 From: "Luck, Tony" Date: Thu, 23 Feb 2006 14:42:39 -0800 Subject: [PATCH 2/2] fix warning from pack-objects.c When compiling on ia64 I get this warning (from gcc 3.4.3): gcc -o pack-objects.o -c -g -O2 -Wall -DSHA1_HEADER='' pack-objects.c pack-objects.c: In function `pack_revindex_ix': pack-objects.c:94: warning: cast from pointer to integer of different size A double cast (first to long, then to int) shuts gcc up, but is there a better way? [jc: Andreas Ericsson suggests to use ulong instead. ] Signed-off-by: Tony Luck Signed-off-by: Junio C Hamano --- pack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack-objects.c b/pack-objects.c index be7a2008c5..0287449b4c 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -99,7 +99,7 @@ static int reused_delta = 0; static int pack_revindex_ix(struct packed_git *p) { - unsigned int ui = (unsigned int) p; + unsigned long ui = (unsigned long)(long)p; int i; ui = ui ^ (ui >> 16); /* defeat structure alignment */