summaryrefslogtreecommitdiff
path: root/git-gui.sh
AgeCommit message (Collapse)AuthorFilesLines
2008-09-01Merge branch 'maint'Libravatar Shawn O. Pearce1-1/+1
* maint: git-gui: Fix string escaping in po2msg.sh git gui: show diffs with a minimum of 1 context line Conflicts: lib/option.tcl
2008-09-01git gui: show diffs with a minimum of 1 context lineLibravatar Clemens Buchacher1-1/+1
Staging hunks without context does not work, because line number information would have to be recomputed for individual hunks. Since it is already possible to stage individual lines using 'Stage Line for Commit', zero context diffs are not really necessary for git gui. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-24git-gui: Allow specifying an initial line for git gui blame.Libravatar Alexander Gavrilov1-2/+11
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: Support starting gitk from Gui BlameLibravatar Alexander Gavrilov1-0/+1
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-08-24git-gui: Teach git gui about file type changesLibravatar Gustaf Hendeby1-1/+17
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-04git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'Libravatar Johannes Sixt1-1/+5
The new execdir is two levels below the root directory, while the old execdir 'bin' was only one level below. This commit adapts the discovery of oguilib that uses relative paths accordingly. We determine whether we have the extra level in the same way in which the Makefile defines sharedir, i.e. whether the last directory part is 'git-core'. Inspired-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-29git-gui: Fix gitk search in $PATH to work on WindowsLibravatar Shawn O. Pearce1-3/+9
Back in 15430be5a1 ("Look for gitk in $PATH, not $LIBEXEC/git-core") git-gui learned to use [_which gitk] to locate where gitk's script is as Git 1.6 will install gitk to $prefix/bin (in $PATH) and all of the other tools are in $gitexecdir. This failed on Windows because _which adds the ".exe" suffix as it searches for the program on $PATH, under the assumption that we can only execute something from Tcl if it is a proper Windows executable. When scanning for gitk on Windows we need to omit the ".exe" suffix. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-27git-gui: Fix the Remote menu separator.Libravatar Alexander Gavrilov1-0/+1
It was positioned incorrectly (offset by one position) if the menu had a tear-off handle. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-25git-gui: Look for gitk in $PATH, not $LIBEXEC/git-coreLibravatar Abhijit Menon-Sen1-3/+3
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-16Kill the blame back-end on window close.Libravatar Alexander Gavrilov1-0/+14
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-0/+2
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-07-16Fix pre-commit hooks under MinGW/MSYSLibravatar Alexander Gavrilov1-2/+2
Apply the work-around for checking the executable permission of hook files not only on Cygwin, but on Windows in general. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-08git-gui: Exit shortcut in MacOSX repairedLibravatar Soeren Finster1-3/+7
Now, as in all OSX apps, there is only one quit menu entry. It's automatically in the wish menu and calls ::tk::mac::Quit when used. Signed-off-by: Soeren Finster <sf@9by6.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-02git-gui: Implement "Stage/Unstage Line"Libravatar Johannes Sixt1-0/+8
This adds a context menu entry below "Stage/Unstage Hunk" that stages or unstages just the line under the mouse pointer. This is by itself useful, for example, if there are unrelated changes in the same hunk and the hunk cannot be split by reducing the context. The feature can also be used to split a hunk by staging a number of additions (or unstaging a number of removals) until there are enough context lines that the hunk gets split. The implementation reads the complete hunk that the line lives in, and constructs a new hunk by picking existing context lines, removing unneeded change lines and transforming other change lines to context lines. The resulting hunk is fed through 'git apply' just like in the "Stage/Unstage Hunk" case. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-06-25git-gui: Don't select the wrong file if the last listed file is staged.Libravatar Abhijit Menon-Sen1-2/+4
Johannes Sixt noticed that if the last file in the list was staged, my earlier patch would display the diff for the penultimate file, but show the file _before_ that as being selected. This was due to my misunderstanding the lno argument to show_diff. This patch fixes the problem: lno is not decremented in the special case to handle the last item in the list (though we still need to use $lno-1 to find the right path for the next diff). Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Tested-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-06-20git-gui: Fix accidental staged state toggle when clicking top pixel rowLibravatar Richard Quirk1-1/+1
If a text widget is asked the index at x,y with y == 0 or y == 1 it will always return 1.0 as the nearest index, regardless of the x position. This means that clicking the top 2 pixels of the Unstaged/Staged Changes lists caused the state of the file there to be toggled. This patch checks that the pixel clicked is greater than 1, so there is less chance of accidentally staging or unstaging changes. Signed-off-by: Richard Quirk <richard.quirk@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-06-13git-gui: Move on to the next filename after staging/unstaging a changeLibravatar Abhijit Menon-Sen1-2/+27
Suppose the "Unstaged Changes" pane contains a list of files, and one of them is selected (i.e., that diff is currently being displayed). If one clicks on the icon to stage the change, git-gui clears the diff and one has to click on another filename to see the next diff in the list. This patch changes that behaviour. If one clicks on the icon to stage (or unstage) the file whose diff is being displayed, git-gui will move on to the next filename in the list and display that diff instead of a blank diff pane. If the selected file was at the end of the list, the diff pane will display the previous diff instead; if the selected file was the only one listed, the diff pane will become blank. If no diff is currently being displayed, this patch changes nothing. Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-05-22git-gui: Handle workdir detection when CYGWIN=nowinsymlinksLibravatar Shawn O. Pearce1-16/+7
If the user has put nowinsymlinks into their CYGWIN environment variable any symlinks created by a Cygwin process (e.g. ln -s) will not have the ".lnk" suffix. In this case workdir is still a workdir, but our detection of looking for "info.lnk" fails as the symlink is actually a normal file called "info". Instead we just always use Cygwin's test executable to see if info/exclude is a file. If it is, we assume from there on it can be read by git-ls-files --others and is thus safe to use on the command line. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-05-20git-gui: Add a --trace command line optionLibravatar Shawn O. Pearce1-8/+39
Often new Git users want to know what commands git-gui uses to make changes, so they can learn the command line interface by mimicking what git-gui does in response to GUI actions. Showing the direct commands being executed is easy enough to implement but this is of little value to end-users because git-gui frequently directly calls plumbing, not porcelain. Since the code is already written and tested, its fairly harmless to include. It may not help a new end-user, but it can help with debugging git-gui or reverse-engineering its logic to further make changes to it or implement another GUI for Git. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-05-08git-gui: Setup branch.remote,merge for shorthand git-pullLibravatar Shawn O. Pearce1-0/+1
When creating new branches if branch.autosetupmerge is not set, or is set to true or always and we have been given a remote tracking branch as the starting point for a new branch we want to create the necessary configuration options in .git/config for the new branch so that a no argument git-pull on the command line pulls from the remote repository's branch. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-04-05git-gui: use +/- instead of ]/[ to show more/less context in diffLibravatar Michele Ballabio1-6/+12
On some systems, brackets cannot be used as event details (they don't have a keysym), so use +/- instead (both on keyboard and keypad) and add ctrl-= as a synonym of ctrl-+ for convenience. [sp: Had to change accelerator to show only "$M1T-="; the original version included "$M1T-+ $M1T-=" but this is not drawn at all on Mac OS X.] Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-04-03git-gui: Switch keybindings for [ and ] to bracketleft and bracketrightLibravatar Shawn O. Pearce1-4/+4
Thanks to Michele Ballabio for the quick fix. This resolves the error introduced by c91ee2bd61. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-04-02git-gui: Add shortcut keys for Show More/Less ContextLibravatar Jonathan del Strother1-8/+32
Bound to Ctrl/Cmd + left & right square brackets, depending on your platform. [sp: Added missing binds for . to allow shortcuts to work when not focused in the commit message area.] Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-15git-gui: Don't translate the special Apple menuLibravatar Shawn O. Pearce1-1/+1
Peter Karlsson pointed out there is no value in translating the string "Apple", as this is used as the dummy label for the Apple menu on Mac OS X systems. The Apple menu is actually not the menu with the Apple corporate logo, but the menu next to it, which shows the name of the application and is typically called the application menu. Most users of git-gui see this menu titled as "Git Gui". The actual label of this menu comes from our Info.plist file and cannot be specified by any other means. Translating this string in the Tcl PO files is not necessary. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-07git-gui: Add option for changing the width of the commit message text boxLibravatar Adam Piątyszek1-1/+2
The width of the commit message text area is currently hard-coded to 75 characters. This value might be not optimal for some projects. For instance users who would like to generate GNU-style ChangeLog file from git commit message might prefer commit messages of width no longer than 70 characters. This patch adds a global and per repository option "Commit Message Text Width", which could be used to change the width of the commit message text area. Signed-off-by: Adam Piątyszek <ediap@users.sourceforge.net> 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-6/+13
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>
2008-02-20Merge branch 'maint'Libravatar Shawn O. Pearce1-1/+1
* maint: git-gui: relax "dirty" version detection
2008-02-19git-gui: relax "dirty" version detectionLibravatar Wincent Colaiuta1-1/+1
"git gui" would complain at launch if the local version of Git was "1.5.4.2.dirty". Loosen the regular expression to look for either "-dirty" or ".dirty", thus eliminating spurious warnings. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-02-12git-gui: Automatically spell check commit messages as the user typesLibravatar Shawn O. Pearce1-1/+33
Many user friendly tools like word processors, email editors and web browsers allow users to spell check the message they are writing as they type it, making it easy to identify a common misspelling of a word and correct it on the fly. We now open a bi-directional pipe to Aspell and feed the message text the user is editing off to the program about once every 300 milliseconds. This is frequent enough that the user sees the results almost immediately, but is not so frequent as to cause significant additional load on the system. If the user has modified the message text during the last 300 milliseconds we delay until the next period, ensuring that we avoid flooding the Aspell process with a lot of text while the user is actively typing their message. We wait to send the current message buffer to Aspell until the user is at a word boundary, thus ensuring that we are not likely to ask for misspelled word detection on a word that the user is actively typing, as most words are misspelled when only partially typed, even if the user has thus far typed it correctly. Misspelled words are highlighted in red and are given an underline, causing the word to stand out from the others in the buffer. This is a very common user interface idiom for displaying misspelled words, but differs from one platform to the next in slight variations. For example the Mac OS X system prefers using a dashed red underline, leaving the word in the original text color. Unfortunately the control that Tk gives us over text display is not powerful enough to handle such formatting so we have to work with the least common denominator. The top suggestions for a misspelling are saved in an array and offered to the user when they right-click (or on the Mac ctrl-click) a misspelled word. Selecting an entry from this menu will replace the misspelling with the correction shown. Replacement is integrated with the undo/redo stack so undoing a replacement will restore the misspelled original text. If Aspell could not be started during git-gui launch we silently eat the error and run without spell checking support. This way users who do not have Aspell in their $PATH can continue to use git-gui, although they will not get the advanced spelling functionality. If Aspell started successfully the version line and language are shown in git-gui's about box, below the Tcl/Tk versions. This way the user can verify the Aspell function has been activated. If Aspell crashes while we are running we inform the user with an error dialog and then disable Aspell entirely for the rest of this git-gui session. This prevents us from fork-bombing the system with Aspell instances that always crash when presented with the current message text, should there be a bug in either Aspell or in git-gui's output to it. We escape all input lines with ^, as recommended by the Aspell manual page, as this allows Aspell to properly ignore any input line that is otherwise looking like a command (e.g. ! to enable terse output). By using this escape however we need to correct all word offsets by -1 as Aspell is apparently considering the ^ escape to be part of the line's character count, but our Tk text widget obviously does not. Available dictionaries are offered in the Options dialog, allowing the user to select the language they want to spellcheck commit messages with for the current repository, as well as the global user setting that all repositories inherit. Special thanks to Adam Flott for suggesting connecting git-gui to Aspell for the purpose of spell checking the commit message, and to Wincent Colaiuta for the idea to wait for a word boundary before passing the message over for checking. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-01-20git-gui: Consolidate hook execution code into a single functionLibravatar Shawn O. Pearce1-0/+28
The code we use to test if a hook is executable or not differs on Cygwin from the normal POSIX case. Rather then repeating that for all three hooks we call in our commit code path we can place the common logic into a global procedure and invoke it when necessary. This also lets us get rid of the ugly "|& cat" we were using before as we can now rely on the Tcl 8.4 feature of "2>@1" or fallback to the "|& cat" when necessary. The post-commit hook is now run through the same API, but its outcome does not influence the commit status. As a result we now show any of the errors from the post-commit hook in a dialog window, instead of on the user's tty that was used to launch git-gui. This resolves a long standing bug related to not getting errors out of the post-commit hook when launched under git-gui. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-14git-gui: Move frequently used commands to the top of the context menu.Libravatar Johannes Sixt1-21/+21
"Stage/Unstage Hunk" is probably the most frequently used command of the patch context menu *and* it is not available in some other form than the context menu. Therefore, it should go to the top. "Less Context" and "More Context" entries are also not easily available otherwise, and are therefore, moved second. The other entries are available via key strokes (Copy, Paste, Refresh) or rarly used (Font Size, Options) and can go last. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-08git-gui: Bind Meta-T for "Stage To Commit" menu actionLibravatar Shawn O. Pearce1-1/+6
Aaron Digulla suggested we bind Ctrl-T or Cmd-T to "Stage To Commit" menu action so it can be easily accessed from the keyboard. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01git-gui: Allow users to set font weights to boldLibravatar Shawn O. Pearce1-1/+8
Previously we allowed users to tweak their font weight to be bold by setting it manually in their ~/.gitconfig prior to starting git-gui. This was broken in ae0754ac9a24afa2693246222fc078fe9c133b3a when Simon set the font weight to normal by default, overridding whatever we found from the ~/.gitconfig file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-26git-gui: Protect against bad translation stringsLibravatar Shawn O. Pearce1-4/+11
If a translation string uses a format character we don't have an argument for then it may throw an error when we attempt to format the translation. In this case switch back to the default format that comes with the program (aka the English translation). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-17git-gui: Paper bag fix the global config parsingLibravatar Shawn O. Pearce1-1/+4
git-config won't honor any options after --list. We must supply the --global option in front of --list if we really want to load the global configuration options. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12git-gui: Ensure copyright message is correctly read as UTF-8Libravatar Shawn O. Pearce1-2/+2
On Windows using the native Tcl/Tk the copyright header is being read from the script using the system encoding, which may not be utf-8. This causes the multi-byte copyright symbol (which is actually encoded as utf-8) to read as two characters and not as a proper copyright symbol. Explicitly asking Tcl to read this sequence of bytes as utf-8 corrects the issue. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12git-gui: offer a list of recent repositories on startupLibravatar Steffen Prohaska1-0/+1
If git-gui is started outside a work tree the repository chooser will offer a list of recently opened repositories. Clicking on any list entry directly opens the repository. The list of recently opened repositories is stored in the config as the multi-valued option gui.recentrepo. If the list grows beyond 10 entries it will be truncated by removing one of the older entries. Only repositories that are opened through the repository chooser will get added to the recent list. Repositories opened from the shell will not yet be added to the recent list, as users are likely to have a way to easily return to the same directory via their shell. [sp: This is actually a combined work from both Steffen and myself. Most of the ideas are Steffen's, as is the basic outline of the code, but any outstanding bugs are entirely my fault.] Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12git-gui: Support LFs embedded in config file valuesLibravatar Shawn O. Pearce1-0/+20
Using the new --null option added to git-config in git 1.5.3 we can safely accept LFs that are embedded in configuration options. This does require a completely different configuration file parser then the pre 1.5.3 version as we are splitting on very different values. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12git-gui: Refactor git-config --list parsingLibravatar Shawn O. Pearce1-21/+14
The parsing for the output of `git config --list` is the same for both the global options and the current repository's options so we can really just use the same parser between them. I'm currently just refactoring the parser so we can use a different one depending on the version of git available to us at runtime. My next change will add support for 1.5.3's --null option. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12git-gui: Move load_config procedure below git-version selectionLibravatar Shawn O. Pearce1-45/+49
To better handle configuration options that contain LFs in their values we want to use the new -z option available in git-config version 1.5.3 and later. To configure load_config based upon the git version we need to move thos below the git-version computation. No logic changes yet, just a minor reordering of the code. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12git-gui: Change main window layout to support wider screensLibravatar Johannes Sixt1-11/+12
The layout is changed to have the file lists at the left (Unstaged Changes at the top, Staged Changes below it) and the diff window at the right (with the commit area below it). +----------+---------------------+ | Unstaged | Diff area | | | | | | | | | | +----------+ | | Staged | | | +---------------------+ | | Commit area | | | | +----------+---------------------+ The advantages are: - The height of the file lists can be adjusted independently to fit the files that they contain. - The diff viewer is higher. On wide screens it is ok that the main window is now generally wider, too. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-10git-gui: add directory git-gui is located in to PATH (on Windows)Libravatar Steffen Prohaska1-0/+3
This commit modifies PATH to include a good guess where git could be found. The first location to search for executable is the directory git-gui is installed in. This is a good guess for a sane installation. Even if git is not available in PATH, git-gui is now able to find it. Hence git-gui can be passed to wish as an absolute path without caring about the environment. We must modify PATH to be able to spawn shell based git commands. For builtins it would be sufficient to located them and execute them with their absolute path. But for shell based git commmands PATH needs to be modified. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-10git-gui: Shorten the staged/unstaged changes title bar textLibravatar Shawn O. Pearce1-2/+2
The titles for the staged and unstaged areas were usually opening up too narrow by default, causing the text to be clipped by Tcl as it tried to center the text in the middle of the available area. This meant that users who were new to git-gui did not get to see the entire header and may be unclear about what the different lists are. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-10git-gui: Bind Cmd-, to Preferences on Mac OS XLibravatar Shawn O. Pearce1-2/+6
A Mac OS X UI convention is to have Cmd-, be the accelerator key for the preferences window, which by convention is located in the apple menu under a separator below the about command. We also now call this "Preferences..." as that is the conventional term used in English. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-10git-gui: Consolidate the Fetch and Push menus into a Remote menuLibravatar Shawn O. Pearce1-7/+13
Sometimes the Fetch menu looks really odd, such as if you are in a repository that has no remotes configured when you start git-gui. Here we didn't have any items to add to the Fetch menu so it was a tad confusing for the end-user to see an empty menu on the menu bar. We now place all of the commands related to fetching and pushing of changes into a single "Remote" menu. This way we have a better class of bucket that we can drop additional remote related items into such as doing a remote merge or editing the remote configuration specs. The shortcuts to execute fetch/remote prune/push on existing remote specifications are now actually submenus listing the remotes by name. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-10Merge branch 'maint'Libravatar Shawn O. Pearce1-0/+1
* maint: git-gui: accept versions containing text annotations, like 1.5.3.mingw.1
2007-10-07git-gui: accept versions containing text annotations, like 1.5.3.mingw.1Libravatar Steffen Prohaska1-0/+1
This commit teaches git-gui to accept versions with annotations that start with text and optionally end with a dot followed by a number. This is needed by the current versioning scheme of msysgit, which uses versions like 1.5.3.mingw.1. However, the changes is not limited to this use case. Any version of the form <numeric version>.<anytext>.<number> would be parsed and only the starting <numeric version> used for validation. [sp: Minor edit to remove unnecessary group matching] Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-03Merge branch 'maint'Libravatar Shawn O. Pearce1-2/+28
* maint: git-gui: Don't crash when starting gitk from a browser session git-gui: Allow gitk to be started on Cygwin with native Tcl/Tk Conflicts: git-gui.sh
2007-10-03git-gui: Don't crash when starting gitk from a browser sessionLibravatar Shawn O. Pearce1-2/+8
If the user has started git-gui from the command line as a browser we offer the gitk menu options but we didn't create the main status bar widget in the "." toplevel. Trying to access it while starting gitk just results in Tcl errors. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-03git-gui: Allow gitk to be started on Cygwin with native Tcl/TkLibravatar Shawn O. Pearce1-0/+20
gitk expects $env(GIT_DIR) to be valid as both a path that core Git and Tcl/Tk can resolve to a valid directory, but it has no special handling for Cygwin style UNIX paths and Windows style paths. So we need to do that for gitk and ensure that only relative paths are fed to it, thus allowing both Cygwin style and UNIX style paths to be resolved. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>