author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 29 Jan 2007 11:56:00 +0000 (06:56 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 29 Jan 2007 11:56:00 +0000 (06:56 -0500) | ||
commit | 37f1db80a46cf753308bfc9b5de9dd3b3a551218 | |
tree | 00fe2989a765c246fcd5cbb869e8ad1f2d692c7a | tree | snapshot |
parent | 747c0cf93c75207da095709a92a615aae0553289 | commit | diff |
git-gui: Assign background colors to each blame hunk.
To help the user visually see which lines are associated with each other
in the file we attempt to sign a unique background color to each commit
and then render all text associated with that commit using that color.
This works out OK for a file which has very few commits in it; but
most files don't have that property.
What we really need to do is look at what colors are used by our
neighboring commits (if known yet) and pick a color which does not
conflict with our neighbor. If we have run out of colors then we
should force our neighbor to recolor too. Yes, its the graph coloring
problem.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
To help the user visually see which lines are associated with each other
in the file we attempt to sign a unique background color to each commit
and then render all text associated with that commit using that color.
This works out OK for a file which has very few commits in it; but
most files don't have that property.
What we really need to do is look at what colors are used by our
neighboring commits (if known yet) and pick a color which does not
conflict with our neighbor. If we have run out of colors then we
should force our neighbor to recolor too. Yes, its the graph coloring
problem.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |