Skip to content

Commit

Permalink
gitview: Fix the graph display .
Browse files Browse the repository at this point in the history
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 <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Aneesh Kumar K.V authored and Junio C Hamano committed Feb 25, 2006
1 parent 9e4f522 commit 1509bd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/gitview/gitview
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 1509bd9

Please sign in to comment.