aboutsummaryrefslogtreecommitdiff
path: root/gitk
Commit message (Collapse)AuthorAge
* gitk: Fix crash when not using themed widgetsMarcus Karlsson2012-10-22
| | | | | | | | | | | | | | | | | | | | | | When configured not to use themed widgets gitk may crash on launch with a message that says that the image "bm-left disabled bm-left-gray" doesn't exist. This happens when the left and right arrow buttons are created. The crash can be avoided by configuring the buttons differently depending on whether or not themed widgets are used. If themed widgets are not used then only set the images to bm-left and bm-right respectively, and keep the old behavior when themed widgets are used. The previous behaviour was added in f062e50f to work around a bug in Tk on OS X where the disabled state did not display properly. The buttons may still not display correctly, however the workaround added in f062e50f will still apply if gitk is used with themed widgets. Make gitk not crash on launch when not using themed widgets. Signed-off-by: Marcus Karlsson <mk@acc.umu.se> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Use bindshiftfunctionkey to bind Shift-F5Andrew Wong2012-10-22
| | | | | Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Refactor code for binding modified function keysAndrew Wong2012-10-22
| | | | | | | | The function includes a workaround for systems where F* keys are mapped to XF86_Switch_VT_* when modifiers are used. Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Work around empty back and forward images when buttons are disabledStefan Haller2012-09-23
| | | | | | | | | | | | | | | On Mac, the back and forward buttons show an empty rectange instead of a grayed-out arrow when they are disabled. The reason is a Tk bug on Mac that causes disabled images not to draw correctly (not to draw at all, that is); see <https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.tcl/V-nW1JBq0eU>. To work around this, we explicitly provide gray images for the disabled state; I think this looks better than the default stipple effect that you get on Windows as well, but that may be a matter of taste. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Highlight first search result immediately on incremental searchStefan Haller2012-09-23
| | | | | | | | | When typing in the "Search" field, select the current search result (so that it gets highlighted in orange). This makes it easier to understand what will happen if you then type Ctrl-S. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Highlight current search hit in orangeStefan Haller2012-09-23
| | | | | | | | | | When searching for text in the diff, and there are multiple occurrences of the search string, the current one is highlighted in orange, and the other ones in yellow. This makes it much easier to understand what happens when you then click the Search button or hit Ctrl-S repeatedly. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Synchronize highlighting in file view when scrolling diffStefan Haller2012-09-23
| | | | | | | | | | | | | | | | | | | | | | | Whenever the diff pane scrolls, highlight the corresponding file in the file list on the right. For a large commit with many files and long per-file diffs, this makes it easier to keep track of what you're looking at. This allows simplifying the prevfile and nextfile functions, because all they have to do is scroll the diff pane. In some situations we want to suppress this mechanism, for example when clicking on a file in the file list to select it, or when searching in the diff, in which case we want to highlight based on the current search hit and not the top line visible. In these cases it's not sufficient to set a "suppress" flag before scrolling and reset it afterwards, because the scrolltext notification is sent deferred from a timer or some such; so we need to remember the scroll position for which we want to suppress the auto-highlighting until the next call to scrolltext; a bit ugly, but does the job. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge branch 'da/gitk-reload-tag-contents' of git://github.com/gitster/gitPaul Mackerras2012-09-12
|\ | | | | | | to get two commits from David Aguilar.
| * gitk: Rename 'tagcontents' to 'cached_tagcontent'David Aguilar2012-09-08
| | | | | | | | | | | | | | | | | | | | | | | | Name the 'tagcontents' variable similarly to the rest of the variables cleared in the changedrefs() function. This makes the naming consistent and provides a hint that it should be cleared when reloading gitk's cache. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitk: Teach "Reread references" to reload tagsDavid Aguilar2012-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Tag contents, once read, are forever cached in memory. This makes gitk unable to notice when tag contents change. Allow users to cause a reload of the tag contents by using the "File->Reread references" action. Reported-by: Tim McCormack <cortex@brainonfire.net> Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | gitk: Fix GIT_TRACE issuesAske Olsson2012-08-04
|/ | | | | | | | | | | | | | | | Check if GIT_TRACE env var is set and unset it if it is. If the environment var GIT_TRACE=1 exists gitk will fail when trying to find gitdir: $ git rev-parse --git-dir trace: built-in: git 'rev-parse' '--git-dir' .git Other git commands will also show debug output hence not work as intended. Signed-off-by: Aske Olsson <askeolsson@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Avoid Meta1-F5Felipe Contreras2012-04-25
| | | | | | | | Meta1-F5 is commonly mapped by window managers and what not. Use Shift-F5 instead. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: fix setting font display with new tabbed dialog layout.Pat Thoyts2012-04-02
| | | | | | | | The changes to the dialog window tree broke the preview of the selected font on the button. This corrects that issue. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitk: fix tabbed preferences construction when using tcl 8.4Pat Thoyts2012-04-02
| | | | | | | | | | | In 8.5 the incr command creates the target variable if it does not exist but in 8.4 using incr on a non-existing variable raises an error. Ensure we have created our counter variable when creating the tabbed dialog for non-themed preferences. Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitk: Teach gitk to respect log.showrootMarcus Karlsson2012-03-24
| | | | | | | | | | | | | | | | | | | In early days, all projects managed by git (except for git itself) had the product of a fairly mature development history in their first commit, and it was deemed unnecessary clutter to show additions of these thousands of paths as a patch. "git log" learned to show the patch for the initial commit without requiring --root command line option at 0f03ca9 (config option log.showroot to show the diff of root commits, 2006-11-23). Teach gitk to respect log.showroot. [paulus@samba.org: Cleaned up the Tcl a bit, use --bool on the git config call] Signed-off-by: Marcus Karlsson <mk@acc.umu.se> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Add menu items for comparing a commit with the marked commitPaul Mackerras2012-03-23
| | | | | | | | | | | | | | | | Sometimes one wants to see the different between two commits that are a long distance apart in the graph display. This is difficult to do with the "Diff this -> selected" and "Diff selected -> this" menu items because the need to maintain the selection means that one can't use the find facilities or the reference list window to navigate from one to the other. This provides an alternative using the mark. Having found one commit, one marks it with the "Mark this commit" menu item, then navigates to the other commit and uses the new "Diff this -> marked commit" and/or "Diff marked commit -> this" menu items. Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Speed up resolution of short SHA1 idsPaul Mackerras2012-03-19
| | | | | | | | | | On large repositories such as the Linux kernel, it can take quite a noticeable time (several seconds) for gitk to resolve short SHA1 IDs to their long form. This speeds up the process by maintaining lists of IDs indexed by the first 4 characters of the SHA1 ID, speeding up the search by a factor of 65536 on large repositories. Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Use symbolic font names "sans" and "monospace" when availableJonathan Nieder2012-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following only concerns systems using X and the client-side font rendering framework from freedesktop.org. Windows and Mac OS X are not affected. Starting with version 8.5, Tk uses freetype and fontconfig by default to render fonts on platforms that support it. Gitk currently defaults to the font Helvetica for the interface and Courier for diffs, and both unfortunately look rather bad on screen in the default configuration on many Linux distros with anti-aliasing and poor hinting. It is better to default to "sans" and "monospace", which are mapped by fontconfig to some appropriate font of the sysadmin and user's choosing (typically Bitstream Vera Sans and Mono). The result looks more sensible and it makes gitk feel like a well-behaved software citizen since its fonts match other native apps. This patch does not change the appearance of gitk for users that have already run it, since gitk uses the remembered UI and diff font names from ~/.gitk. Requested-by: Michael Biebl <biebl@debian.org> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Mark Hills <mark@pogo.org.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Skip over AUTHOR/COMMIT_DATE when searching all fieldsFrédéric Brière2012-03-19
| | | | | | | | | | | This prevents a search for a number like "105" on "All Fields" from matching against the raw author and commit timestamps. These timestamps were already not searchable by themselves, and the displayed format does not match the query string anyway. Signed-off-by: Frédéric Brière <fbriere@fbriere.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Make "git describe" output clickable, tooJim Meyering2012-03-19
| | | | | | | | | | | | | | | | Automake's contribution guidelines suggest using "git describe" output in commit logs to reference previous commits. By contrast, in coreutils, I had acquired the habit of using a bare SHA1 prefix (8 hex digits), since gitk creates clickable links for that, and not for "git describe" output. I prefer the readability of the full "git describe" output, yet want to retain the gitk links, so this renders as clickable not just SHA1-like strings, but also an SHA1-like string that is prefixed by "-g". Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Fix the display of files when filtered by pathPat Thoyts2012-03-19
| | | | | | | | | | | | | Launching 'gitk -- .' or 'gitk -- ..\t' restricts the display to files under the given directory but the file list is left empty. This is because the path_filter function fails to match the filenames which are relative to the working tree to the filter which is filessytem relative. This solves the problem by making both names fully qualified filesystem paths before performing the comparison. Tested-by: David Aguilar <davvid@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Use a tabbed dialog to edit preferencesPat Thoyts2012-03-19
| | | | | | | | | | | | | | This commit converts the user preferences dialog into a tabbed property sheet grouping general properties, colours and font selections onto separate pages. The previous implementation was exceeding the screen height on some systems and this avoids such problems and permits extension using new pages in the future. If themed Tk is unavailable or undesired a reasonable facsimile of the tabbed notebook widget is used instead. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Use "gitk: repo-top-level-dir" as window titleZbigniew Jędrzejewski-Szmek2012-03-19
| | | | | | | | | | Previously, when run in a subdirectory, gitk would show the name of this subdirectory as title, which was misleading. When run with GIT_DIR set, it would show the cwd, which is even more misleading. In case of non-bare repos, the .git suffix in the path is skipped. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
* gitk: Make vi-style keybindings more vi-likeJonathan Nieder2011-10-08
| | | | | | | | | | | | | | | | | | | When commit 6e2dda35 (Add new keybindings, 2005-09-22) added vi-style keybindings to gitk (an excellent idea!), instead of adopting the usual "hjkl = left, down, up, right" bindings used by less, vi, rogue, and many other programs, it used "ijkl = up, left, down, right" to mimic the inverted-T formation of the arrow keys on a qwerty keyboard, in the style of Lode runner. So using 'j' and 'k' to scroll through commits produces utterly confusing results to the vi user, as 'k' moves down and 'j' moves to the previous commit. Luckily most non-vi-users are probably using an alternate set of keys (cursor keys or z/x + n/p) anyway. Switch to the expected vi/nethack convention. Requested-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Make "touching paths" search support backslashesYggy King2011-07-24
| | | | | | | | | | | | | | | | | | | | | | | Gitk can search for commits touching a specified path. The search text is always treated as a regular expression, regardless of the matching option selected (Exact, IgnCase, or Regexp). In particular, backslashes escape the next character. This is inconvenient on Windows systems, where backslashes are the norm for path specifiers, for example when copy/pasting from Windows Explorer or a cmd shell -- these copy-pasted paths must be manually modified in the gitk search text edit box before they will work. This change uses the match option "Exact" to mean that a slash is a slash, not part of a regular expression. Backslashes are converted to frontslashes before searching, thus allowing easy copy/pasting of paths on Windows systems. If the previous behaviour of "touching paths" search is desired, simply select the "Regexp" search mode. One potential drawback is that the default setting for the match option ($findtype in the code) is "Exact", and so this change alters the default behaviour, which may confuse users and lead to bug reports. Signed-off-by: Yggy King <yggy@zeroandone.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Show modified files with separate work treeMartin von Zweigbergk2011-07-24
| | | | | | | | | | | | "git rev-parse --is-inside-work-tree" is currently used to determine whether to show modified files in gitk (the red and green fake commits). This does not work if the current directory is not inside the work tree, as can be the case e.g. if GIT_WORK_TREE is set. Instead, check if the repository is not bare and that we are not inside the .git directory. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Simplify calculation of gitdirMartin von Zweigbergk2011-07-24
| | | | | | | | | | | | | | | | | | | | Since 5024baa ([PATCH] Make gitk work when launched in a subdirectory, 2007-01-09), gitk has used 'git rev-parse --git-dir' to find the .git directory. However, gitk still first checks for the $GIT_DIR environment variable and that the value returned from git-rev-parse does not point to a file. Since git-rev-parse does both of these checks already, the checks can safely be removed from gitk. This makes the gitdir procedure small enough to inline. This cleanup introduces a UI regression in that the error message will now be "Cannot find a git repository here." even in the case where GIT_DIR points to a file, for which the error message was previously "Cannot find the git directory \"%s\".". It should be noted, though, that even before this patch, 'gitk --git-dir=path/to/some/file' would give the former error message. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Run 'git rev-parse --git-dir' only onceMartin von Zweigbergk2011-07-24
| | | | | | | | | | | It seems like gitk has been setting the global variable 'gitdir' at startup since aa81d97 (gitk: Fix Update menu item, 2006-02-28). It should therefore no longer be necessary to call the procedure with the same name (more than once to set the global variable). Remove the other call sites and use the global variable instead. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Put temporary directory inside .gitMartin von Zweigbergk2011-07-24
| | | | | | | | | | | | | | | | | When running "External diff" from gitk, the "from" and "to" files will first be copied into a directory that is currently ".git/../.gitk-tmp.$pid". When gitk is closed, the directory is deleted. When the work tree is not at ".git/.." (which is supported since the previous commit), that directory may not even be git-related and it does not seem unlikely that permissions may not allow the temporary directory to be created there. Move the directory inside .git instead. This introduces a regression in the case that the .git directory is readonly, but .git/.. is writeable. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Fix "External diff" with separate work treeMartin von Zweigbergk2011-07-24
| | | | | | | | | | | | Running "External diff" to compare the index and work tree currently brings up an empty blame view when the work tree is not the parent of the git directory. This is because the file that is taken from the work tree is assumed to be in $GIT_DIR/../<repo-relative-file-name>. Fix it by feeding the diff tool a path under $GIT_WORK_TREE instead of "$GIT_DIR/..". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Fix "blame parent commit" with separate work treeMartin von Zweigbergk2011-07-24
| | | | | | | | | | Running "blame parent commit" currently brings up an empty blame view when the the work tree is not the parent of the git directory. Fix it by feeding git-blame paths relative to $GIT_WORK_TREE instead of "$GIT_DIR/..". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Fix "show origin of this line" with separate work treeMartin von Zweigbergk2011-07-24
| | | | | | | | | Running "show origin of this line" currently fails when the the work tree is not the parent of the git directory. Fix it by feeding git-blame paths relative to $GIT_WORK_TREE instead of "$GIT_DIR/..". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Fix file highlight when run in subdirectoryMartin von Zweigbergk2011-07-24
| | | | | | | | | | | | | | | | | The "highlight this only" and "highlight this too" commands in gitk add the path relative to $GIT_WORK_TREE to the "Find" input box. When the search (using git-diff-tree) is run, the paths are used unmodified, except for some shell escaping. Since the search is run from gitk's working directory, no commits matching the paths will be found if gitk was started in a subdirectory. Make the paths passed to git-diff-tree relative to gitk's working directory instead of being relative to $GIT_WORK_TREE. If, however, gitk is run outside of the working directory (e.g. with $GIT_WORK_TREE set), we still need to use the path relative to $GIT_WORK_TREE. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Update copyrightPaul Mackerras2011-07-24
| | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: When a commit contains a note, mark it with a yellow boxRaphael Zimmerer2011-05-29
| | | | | | | | | | It is desirable to see at a glance which commits do contain notes. Therefore mark them with a yellow rectangle. That can be suppressed with `gitk --no-notes`. Signed-off-by: Raphael Zimmerer <killekulla@rdrz.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Remember time zones from author and commit timestampsAnders Kaseorg2011-05-29
| | | | | | | | | | | | When resolving a conflicted cherry-pick, this lets us pass GIT_AUTHOR_DATE to git citool with the correct timezone. It does this by making elements 2 and 4 of the commitinfo array entries, which store the author and committer dates of the commit, be 2-element lists storing the numerical date and timezone offset, rather than just the numerical date. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Remove unused $cdate arrayAnders Kaseorg2011-05-29
| | | | | | | It was unused since commit 9f1afe05c3 ("gitk: New improved gitk"). Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Update cherry-pick error message parsingAnders Kaseorg2011-04-09
| | | | | | | | | | | | | | | Commit 981ff5c37ae20687c98d98c8689d5e89016026d2 changed the error message from git cherry-pick from Automatic cherry-pick failed. [...advice...] to error: could not apply 7ab78c9... Do something neat. [...advice...] Update gitk’s regex to match this, restoring the ability to launch git citool to resolve conflicted cherry-picks. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Quote tag names in event bindings to avoid problems with % charsPat Thoyts2011-03-09
| | | | | | | | | | Tag names that contain a % character require quoting when used in event bindings or the name may be mis-recognised for percent substitution in the event script. Reported-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Allow user to control how much of the SHA1 ID gets auto-selectedPaul Mackerras2011-03-09
| | | | | | | This adds a new spinbox on the Edit Preferences pane to allow the user to control how many characters of the SHA1 ID get autoselected. Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Take only numeric version components when computing $git_versionAnders Kaseorg2011-01-19
| | | | | | | | | | | | | | | | | | This fixes errors running with release candidate versions of Git: Error in startup script: expected version number but got "1.7.4-rc0" Also, $git_version is no longer artificially limited to three components. That limitation was added by commit 194bbf6cc8c2 ("gitk: Handle msysGit version during version comparisons") to deal with msysGit version strings like “1.6.4.msysgit.0”, and we don’t need it now. Hence as another side effect, this enables showing notes with git version 1.6.6.2 or 1.6.6.3, as originally intended by commit 7defefb13427 ("gitk: Show notes by default (like git log does"). Signed-off-by: Anders Kaseorg <andersk@mit.edu> Reported-by: Mathias Lafeldt <misfire@debugon.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Make text selectable on MacStefan Haller2010-12-12
| | | | | | | | | | | | | | | | | | | | Stolen from git-gui, 23effa79f7 (original log message by Shawn O. Pearce <spearce@spearce.org> follows): git-gui: Force focus to the diff viewer on mouse click. Apparently a "feature" of Tcl/Tk on Mac OS X is that a disabled text widget cannot receive focus or receive a selection within it. This makes the diff viewer almost useless on that platform as you cannot select individual parts of the buffer. Now we force focus into the diff viewer when its clicked on with button 1. This works around the feature and allows selection to work within the viewer just like it does on other less sane systems, like Microsoft Windows. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Prevent the text pane from becoming editableStefan Haller2010-12-12
| | | | | | | | | | When setting the "Patch/Tree" radio buttons to "Tree" and clicking on a file to display it, the text pane would accidentally become editable (because of the early return in getblobline). Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Add the equivalent of diff --color-wordsThomas Rast2010-12-12
| | | | | | | | | | | | | | | | | | Use the newly added 'diff --word-diff=porcelain' to teach gitk a color-words mode, with two different modes analogous to the --word-diff=plain and --word-diff=color settings. These are selected by a dropdown box. As an extra twist, automatically enable this word-diff support when the user mentions a word-diff related option on the command line. These options were previously ignored because they would break diff parsing. Both of these features are only enabled if we have a version of git that supports --word-diff=porcelain, meaning at least 1.7.2. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Show notes by default (like git log does)Kirill Smelkov2010-05-30
| | | | | | | | | | | | | | | | | | | | | | Starting from ~ git-1.6.6, log, show & whatchanged show notes by default. On the other hand, gitk does not show notes by default, because under the hood it calls 'git log --pretty=raw ...' to get the log, and in 'git log' notes are turned off when user specifies format or pretty settings. Yes, it is possible to invoke 'gitk --show-notes' explicitly, but since from user's perspective, gitk is gui enabled git log, it would be logical for gitk to show notes by default too for consistency. In git, --show-notes was introduced in 66b2ed (Fix "log" family not to be too agressive about showing notes) which predates 1.6.6.2. Notes can still be supressed with 'gitk --no-notes'. Cc: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Display dirty submodules correctlyJens Lehmann2010-04-17
| | | | | | | | | | | | Since recently "git diff --submodule" prints out extra lines when the submodule contains untracked or modified files. Show all those lines of one submodule under the same header. Also for newly added or removed submodules the submodule name contained trailing garbage because the extraction of the name was not done right. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Fix display of copyright symbolPat Thoyts2010-03-20
| | | | | | | | | | | | | The script file uses utf-8 encoding but when sourced it will be read using the default system encoding which is never utf8 on windows. This causes the copyright symbol to display incorrectly in the about dialog. Using the unicode escape sequence avoids incorrect decoding but does require a double escape in the .po files. Also adjusted the year range. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Add emacs editor variable blockPat Thoyts2010-03-20
| | | | | | | Help contributors use the correct indentation style. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Avoid calling tk_setPalette on WindowsPat Thoyts2010-03-20
| | | | | | | This just messes up the system colors. Leave them alone. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* gitk: Don't clobber "Remember this view" settingJonathan Nieder2010-03-20
| | | | | | | | | | | | | | | | | In the View → Edit View... dialog, the "Remember this view" option always starts out unset. Using the dialog to change an existing view and ignoring the parts of the dialog that aren’t relevant results in both the old and new versions of the view being lost. The cause: right after newviewopts($curview,perm) is set to an appropriate value, decode_view_opts is clobbering it with the default value. If that call is moved a little earlier, the "Remember this view" option gets properly set to its previous value, fixing the problem. Reported-by: Steve Cotton <steve0001@s.cotton.clara.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>