summaryrefslogtreecommitdiff
path: root/lib/blame.tcl
AgeCommit message (Collapse)AuthorFilesLines
2008-11-11git-gui: Request blame metadata in utf-8.Libravatar Alexander Gavrilov1-1/+1
The blame builtin now supports automatic conversion of metadata encoding. By default it is converted to the character set specified by i18n.logoutputencoding. Since gui blame expects the data in utf-8, it is necessary to specify the desired encoding directly. An old version of the blame command will simply ignore the option. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-11git-gui: Fix focus transition in the blame viewer.Libravatar Alexander Gavrilov1-4/+12
Now that the blame viewer has a search panel, it should be taken into account by the focus transition code. Otherwise showing a commit tip (by accidentally moving the mouse to the text frame) causes the focus to transfer away from the search field. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-10git-gui: Fix the blame viewer destroy handler.Libravatar Alexander Gavrilov1-1/+8
It did not delete the object, which is not very good. Also, destroy may be fired up for subwindows, so we should check %W. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-10git-gui: Add a search command to the blame viewer.Libravatar Alexander Gavrilov1-3/+34
One of the largest deficiencies in the blame viewer at the moment is the impossibility to search for a text string. This commit fixes it by adding a Firefox-like search panel to the viewer. The panel can be shown by pressing F7 or clicking a menu entry, and is hidden by pressing Esc. Find Next is available through the F3 key. Implementation is based on the gitk code, but heavily refactored. It now also supports case-insensitive searches, and uses the text box background color to signal success or failure of the search. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-10git-gui: Fix the blame window shape.Libravatar Alexander Gavrilov1-6/+13
On modern high-resolution monitors the blame viewer window is very high, yet too narrow. This patch makes it gravitate to a more sane resolution, which takes the font size into account. It also changes the default text view size to 80% of the window, and slightly modifies the border decorations for better appearance. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-24git-gui: Support the encoding menu in gui blame.Libravatar Alexander Gavrilov1-0/+17
Allow dynamically changing the encoding from the blame viewer as well. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Tested-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-24git-gui: Cleanup handling of the default encoding.Libravatar Alexander Gavrilov1-1/+1
- Make diffs and blame default to the system (locale) encoding instead of hard-coding UTF-8. - Add a gui.encoding option to allow overriding it. - gitattributes still have the final word. The rationale for this is Windows support: 1) Windows people are accustomed to using legacy encodings for text files. For many of them defaulting to utf-8 will be counter-intuitive. 2) Windows doesn't support utf-8 locales, and switching the system encoding is a real pain. Thus the option. This patch also adds proper encoding conversion to Apply Hunk/Line. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Tested-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-24git-gui: Assume `blame --incremental` output is in UTF-8Libravatar Shawn O. Pearce1-7/+1
Most commits have author name encoded in UTF-8, but the incremental blame output dumps raw bytes and doesn't give us the encoding header from the commit. Rather than fixing up tooltip data after we have viewed that particular commit in the blame viewer we can assume all names are in UTF-8. This is still going to cause problems when the author name is not encoded in UTF-8, but the only (efficient) way to solve that is to add an "encoding" header to the blame --incremental mode output, as otherwise we need to run `git cat-file commit $sha1` for each and every commit identified and that would be horribly expensive on any platform. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-24git-gui: Use gitattribute "encoding" for file content displayLibravatar Shawn O. Pearce1-1/+4
Most folks using git-gui on internationalized files have complained that it doesn't recognize UTF-8 correctly. In the past we have just ignored the problem and showed the file contents as binary/US-ASCII, which is wrong no matter how you look at it. This really should be a per-file attribute, managed by .gitattributes, so we now pull the "encoding" attribute data for the given path from the .gitattributes (if available) and use that, falling back to UTF-8 if the attributes are unavailable, git-check-attr is broken, or an encoding for this path not specified. We apply the encoding anytime we show file content, which currently is limited to only the diff viewer and the blame viewer. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-12git-gui: Fix Blame Parent & Context for working copy lines.Libravatar Alexander Gavrilov1-3/+26
Make Blame Parent Commit and Show History Context work properly for lines blamed on the working copy. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <sop@google.com>
2008-08-24git-gui: Allow specifying an initial line for git gui blame.Libravatar Alexander Gavrilov1-2/+2
Add a command-line option to make git gui blame automatically scroll to a specific line in the file. Useful for integration with other tools. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-24git-gui: Better positioning in Blame Parent CommitLibravatar Alexander Gavrilov1-4/+61
Invoke diff-tree between the commit and its parent, and use the hunks to fix the target line number, accounting for addition and removal of lines. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-24git-gui: Support passing blame to a parent commit.Libravatar Alexander Gavrilov1-10/+38
Add a context menu item that switches the view to the parent of the commit under cursor. It is useful to see how the file looked before the change, and find older changes in the same lines. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-24git-gui: Support starting gitk from Gui BlameLibravatar Alexander Gavrilov1-2/+53
Add a context menu command to load commits that are within a certain time range from the selected commit into gitk. It can be useful for understanding of the code, especially if the repository is imported from a VCS that does not support atomic commits. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-16Add a menu item to invoke full copy detection in blame.Libravatar Alexander Gavrilov1-0/+69
Add a context menu item to invoke blame -C -C -C on a chunk of the file. The results are used to update the 'original location' column of the blame display. The chunk is computed as the smallest line range that covers both the 'last change' and 'original location' ranges of the line that was clicked to open the menu. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-16Kill the blame back-end on window close.Libravatar Alexander Gavrilov1-4/+12
Currently 'git-gui blame' does not kill its back-end process, hoping that it will die anyway when the pipe is closed. However, in some cases the process works for a long time without producing any output. This behavior results in a runaway CPU hog. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-16Add options to control the search for copies in blame.Libravatar Alexander Gavrilov1-8/+12
On huge repositories, -C -C can be way too slow to be unconditionally enabled, and it can also be useful to control its precision. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-05git-gui: if a background colour is set, set foreground colour as wellLibravatar Philipp A. Hartmann1-5/+20
In several places, only the background colour is set to an explicit value, sometimes even "white". This does not work well with dark colour themes. This patch tries to set the foreground colour to "black" in those situations, where an explicit background colour is set without defining any foreground colour. Signed-off-by: Philipp A. Hartmann <ph@sorgh.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-27git-gui: fix typo in lib/blame.tclLibravatar Michele Ballabio1-1/+1
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-14git-gui: Paper bag fix missing translated stringsLibravatar Shawn O. Pearce1-6/+6
The Tcl expression "[append [mc Foo] Bar]" does not return the string "FooBar" after translation; instead it is setting the variable Foo to the value Bar, or if Foo is already defined it is appending Bar onto the end of it. This is *not* what we wanted to have happen here. Tcl's join function is actually the correct function but its default joinStr argument is a single space. Unfortunately all of our call sites do not want an extra space added to their string. So we need a small wrapper function to make the call to join with an empty join string. In C this is (roughly) the job of the strcat function. Since strcat is not yet used at the global level it is a reasonable name to use here. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-13git-gui: add some strings to translationLibravatar Michele Ballabio1-12/+12
Most of these changes were suggested by Shawn Pearce in an answer to Johannes Schindelin. Some strings for the blame module were added too. [sp: Minor edits in blame module formatting] Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-10git-gui: Localize commit/author dates when displaying themLibravatar Shawn O. Pearce1-16/+4
Currently the Git plumbing is not localized so it does not know how to output weekday and month names that conform to the user's locale preferences. This doesn't fit with the rest of git-gui's UI as some of our dates are formatted in Tcl and some are just read from the Git plumbing so dates aren't consistently presented. Since git-for-each-ref is presenting us formatted dates and it offers no way to change that setting even in git 1.5.3.1 we need to first do a parse of the text strings it produces, correct for timezones, then reformat the timestamp using Tcl's formatting routines. Not exactly what I wanted to do but it gets us consistently presented date strings in areas like the blame viewer and the revision picker mega-widget's tooltips. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-02Mark strings for translation.Libravatar Christian Stimming1-5/+5
The procedure [mc ...] will translate the strings through msgcat. Strings must be enclosed in quotes, not in braces, because otherwise xgettext cannot extract them properly, although on the Tcl side both delimiters would work fine. [jes: I merged the later patches to that end.] Signed-off-by: Christian Stimming <stimming@tuhh.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-07-19git-gui: Don't show blame tooltips that we have no data forLibravatar Shawn O. Pearce1-0/+5
If we haven't yet loaded any commit information for a given line but our tooltip timer fired and tried to draw the tooltip we shouldn't; there is nothing to show. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-19git-gui: Translate standard encoding names to Tcl onesLibravatar Shawn O. Pearce1-7/+12
This is a essentially a copy of Paul Mackerras encoding support from gitk. I stole the code from gitk commit fd8ccbec4f0161, as Paul has already done all of the hard work setting up this translation table. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-17git-gui: Always disable the Tcl EOF character when readingLibravatar Shawn O. Pearce1-0/+1
On Windows (which includes Cygwin) Tcl defaults to leaving the EOF character of input file streams set to the ASCII EOF character, but if that character were to appear in the data stream then Tcl will close the channel early. So we have to disable eofchar on Windows. Since the default is disabled on all platforms except Windows, we can just disable it everywhere to prevent any sort of read problem. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-09git-gui: Always use absolute path to all git executablesLibravatar Shawn O. Pearce1-14/+7
Rather than making the C library search for git every time we want to execute it we now search for the main git wrapper at startup, do symlink resolution, and then always use the absolute path that we found to execute the binary later on. This should save us some cycles, especially on stat challenged systems like Cygwin/Win32. While I was working on this change I also converted all of our existing pipes ([open "| git ..."]) to use two new pipe wrapper functions. These functions take additional options like --nice and --stderr which instructs Tcl to take special action, like running the underlying git program through `nice` (if available) or redirect stderr to stdout for capture in Tcl. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-08git-gui: Extract blame viewer status bar into mega-widgetLibravatar Shawn O. Pearce1-41/+11
Our blame viewer has had a very fancy progress bar at the bottom of the window that shows the current status of the blame engine, which includes the number of lines completed as both a text and a graphical meter. I want to reuse this meter system in other places, such as during a branch switch where read-tree -v can give us a progress meter for any long-running operation. This change extracts the code and refactors it as a widget that we can take advantage of in locations other than in the blame viewer. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-08Merge branch 'maint'Libravatar Shawn O. Pearce1-0/+4
* maint: git-gui: Skip nicknames when selecting author initials
2007-07-08git-gui: Skip nicknames when selecting author initialsLibravatar Shawn O. Pearce1-0/+4
Our blame viewer only grabbed the first initial of the git.git author string "Simon 'corecode' Schubert". Here the problem was we looked at Simon, pulled the S into the author initials, then saw the single quote as the start of the next name and did not like this character as it was not an uppercase letter. We now skip over single quoted nicknames placed within the author name field and grab the initials following it. So the above name will get the initials SS, rather than just S. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-08git-gui: use "blame -w -C -C" for "where did it come from, originally?"Libravatar Junio C Hamano1-1/+9
The blame window shows "who wrote the piece originally" and "who moved it there" in two columns. In order to identify the former more correctly, it helps to use the new -w option. [sp: Minor change to only enable -w if underlying git >= 1.5.3] Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-04git-gui: Start blame windows as tall as possibleLibravatar Shawn O. Pearce1-1/+2
Most users these days are using a windowing system attached to a monitor that has more than 600 pixels worth of vertical space available for application use. As most files stored by Git are longer than they are wide (have more lines than columns) we want to dedicate as much vertical space as we can to the viewer. Instead of always starting the window at ~600 pixels high we now start the window 100 pixels shorter than the screen claims it has available to it. This -100 rule is used because some popular OSen add menu bars at the top of the monitor, and docks on the bottom (e.g. Mac OS X, CDE, KDE). We want to avoid making our window too big and causing the window's resize control from being out of reach of the user. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-27git-gui: Don't nice git blame on MSYS as nice is not supportedLibravatar Shawn O. Pearce1-1/+5
Johannes Sixt reported that MinGW/MSYS does not have a nice.exe to drop the priority of a child process when it gets spawned. So we have to avoid trying to start `git blame` through nice when we are on Windows and do not have Cygwin available to us. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-20git-gui: Bind Tab/Shift-Tab to cycle between panes in blameLibravatar Shawn O. Pearce1-1/+5
The blame viewer is composed of two different areas, the file area on top and the commit area on the bottom. If users are trying to shift the focus it is probably because they want to shift from one area to the other, so we just setup Tab and Shift-Tab to jump from the one half to the other in a cycle. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-11git-gui: Save geometry before the window layout is damagedLibravatar Shawn O. Pearce1-1/+0
Because Tk does not assure us the order that it will process children in before it destroys the main toplevel we cannot safely save our geometry data during a "bind . <Destroy>" event binding. The geometry may have already changed as a result of a one or more children being removed from the layout. This was pointed out in gitk by Mark Levedahl, and patched over there by commit b6047c5a8166a71e01c6b63ebbb67c6894d95114. So we now also use "wm protocol . WM_DELETE_WINDOW" to detect when the window is closed by the user, and forward that close event to our main do_quit routine. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-08git-gui: Changed blame header bar background to match main windowLibravatar Shawn O. Pearce1-7/+7
The main window's diff header bar background switched from orange to gold recently, and I liked the effect it had on readability of the text. Since I wanted the blame viewer to match, here it is. Though this probably should be a user defined color, or at least a constant somewhere that everyone can reference. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Favor the original annotations over the recent onesLibravatar Shawn O. Pearce1-9/+13
Usually when you are looking at blame annotations for a region of a file you are more interested in why something was originally done then why it is here now. This is because most of the time when we get original annotation data we are looking at a simple refactoring performed to better organize code, not to change its semantic meaning or function. Reorganizations are sometimes of interest, but not usually. We now show the original commit data first in the tooltip. This actually looks quite nice as the original commit will usually have an author date prior to the current (aka move/copy) annotation's commit, so the two commits will now tend to appear in chronological order. I also found myself to always be clicking on the line of interest in the file column but I always wanted the original tracking data and not the move/copy data. So I changed our default commit from $asim_data (the simple move/copy annotation) to the more complex $amov_data (the -M -C -C original annotation). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Improve our labeling of blame annotation typesLibravatar Shawn O. Pearce1-4/+6
It feels wrong to call the -M -C -C annotations "move/copy tracking" as they are actually the original locations. So I'm relabeling the status bar to show "copy/move tracking annotations" for the current file (no -M -C -C) as that set of annotations tells us who put the hunk here (who moved/copied it). I'm now calling the -M -C -C pass "original location annotations" as that's what we're really digging for. I also tried to clarify some of the text in the hover tooltip. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Use three colors for the blame viewer backgroundLibravatar Shawn O. Pearce1-19/+61
To prevent neighboring lines that are different commits from using the same background color we now use 3 colors and assign them by selecting the color that is not used before or after the line in question. We still color "on the fly" as we receive hunks from git-blame, but we delay our color decisions until we are getting the original location data (the slower -M -C -C pass) as that is usually more fine-grained than the current location data. Credit goes to Martin Waitz for the tri-coloring concept. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Jump to original line in blame viewerLibravatar Shawn O. Pearce1-13/+42
When the user clicks on a commit link within one of the columns in the blame viewer we now jump them not just to that commit/file pair but also to the line of the original file. This saves the user a lot of time, as they don't need to search through the new file data for the chunk they were previously looking at. We also restore the prior view when the user clicks the back button to return to a pior commit/file pair that they were looking at. Turned out this was quite tricky to get working in Tk. Every time I tried to jump the text widgets to the correct locations by way of the "yview moveto" or "see" subcommands Tk performed the change until the current event finished dispatching, and then reset the views back to 0, making the change never take place. Forcing Tk to run the pending events before we jump the UI resolves the issue. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Display both commits in our tooltipsLibravatar Shawn O. Pearce1-58/+72
If we have commit data from both the simple blame and the rename/move tracking blame and they differ than there is a bigger story to tell. We now include data from both commits so that the user can see that this link as moved, who moved it, and where it originated from. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Run blame twice on the same file and display both outputsLibravatar Shawn O. Pearce1-63/+113
We now perform two passes over any input file given to the blame viewer. Our first pass is a quick "git-blame" with no options, getting the details of how each line arrived into this file. We are specifically ignoring/omitting the rename detection logic as this first pass is to determine why things got into the state they are in. Once the first pass is complete and is displayed in the UI we run a second pass, using the much more CPU intensive "-M -C -C" options to perform extensive rename/movement detection. The output of this second pass is shown in a different column, allowing the user to see for any given line how it got to be, and if it came from somewhere else, where that is. This is actually very instructive when run on our own lib/branch.tcl script. That file grew recently out of a very large block of code in git-gui.sh. The first pass shows when I created that file, while the second pass shows the original commit information. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Display the "Loading annotation..." message in italicLibravatar Shawn O. Pearce1-1/+4
If the user clicks on a line region that we haven't yet received an annotation for from git-blame we show them "Loading annotation". But I don't want the user to confuse this loading message with a commit whose first line is "Loading annotation" and think we messed up our display somehow. Since we never use italics for anything else, I'm going with the idea that italic slant can be used to show data is missing/elided out at the time being. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Rename fields in blame viewer to better descriptionsLibravatar Shawn O. Pearce1-58/+58
Calling the commit message pane $w_cmit is a tad confusing when we also have the $w_cgrp column that shows the abbreviated SHA-1s. So w_cmit -> w_cviewer, as it is the "commit viewer"; and w_cgrp -> w_amov as it is the "annotated commit + move tracking" column. Also changed line_data -> amov_data, as that list is exactly the results shown in w_amov. Why call the column "move tracking"? Because this column holds data from "git blame -M -C". I'm considering adding an additional column that holds the data from "git blame" without -M/-C, showing who did the copy/move, and when they did it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Label the uncommitted blame history entryLibravatar Shawn O. Pearce1-0/+2
If the user runs the blame viewer on a working directory file instead of a specific commit-ish then we have no value for the commit SHA1 or the summary line; this causes the history menu to get an empty entry at the very bottom. We now look for this odd case and call the meny entry "Working Directory". Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Switch internal blame structure to Tcl listsLibravatar Shawn O. Pearce1-30/+39
The Tcl list datatype is significantly faster to work with than the array type, especially if our indexes are a consecutive set of numbers, like say line numbers in a file. This rather large change reorganizes the internal data structure of the blame viewer to use a proper Tcl list for the annotation information about a line. Each line is given its own list within the larger line_data list, where the indexes correspond to various facts about that particular line. The interface does seem to be more responsive this way, with less time required by Tcl to process blame, and to switch to another version of the same file. It could just be a placebo effect, but either way most Tcl experts perfer lists for this type of work over arrays. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Cleanup redundant column management in blame viewerLibravatar Shawn O. Pearce1-75/+46
The code to handle our three different text widgets is a bit on the messy side as we issue the same command on all three widgets one at a time. Adding (or removing) columns from the viewer is messy, as a lot of locations need to have the new column added into the sequence, or removed from it. We also now delete the tags we create for each commit when we switch to display another "commit:path" pair. This way the text viewer doesn't get bogged down with a massive number of tags as we traverse through history. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Better document our blame variablesLibravatar Shawn O. Pearce1-32/+34
The array variable "order" used to be used to tell us in what order each commit was received in. Recent changes have removed that need for an ordering and the "order" array is now just a boolean 'do we have that commit yet' flag. The colors were moved to fields, so they appear inside of the blame viewer instance. This keeps two different concurrently running blame viewers from stepping on each other's ordering of the colors in group_colors. Most of the other fields were moved around a little bit so that they are organized by major category and value lifespan. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Remove unused commit_list from blame viewerLibravatar Shawn O. Pearce1-4/+1
This list used to store the commits in the order we received them in. I originally was using it to update the colors of the commit before and the commit after the current commit, but since that interface concept turned out to be horribly ugly and has been removed we no longer need this list. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-06git-gui: Automatically expand the line number column as neededLibravatar Shawn O. Pearce1-0/+7
After we finish reading a chunk of data from the file stream we know how many digits we need in the line number column to show the current maximum line number. If our line number column isn't wide enough, we should expand it out to the correct width. Any file over our default allowance of 5 digits (99,999 lines) is so large that the slight UI "glitch" when we widen the column out is trivial compared to the time it will take Git to fully do the annotations. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>