aboutsummaryrefslogtreecommitdiffstats
path: root/git-gui
AgeCommit message (Collapse)AuthorFilesLines
2010-02-07Merge git://repo.or.cz/git-guiv1.7.0-rc2Junio C Hamano34-2514/+3126
* git://repo.or.cz/git-gui: git-gui: update french translation git-gui: update Japanese translation git-gui: fix shortcut for menu "Commit/Revert Changes" git-gui: Quote git path when starting another gui in a submodule git-gui: update Italian translation git-gui: Update Swedish translation (520t0f0u) git-gui: use themed tk widgets with Tk 8.5 git-gui: Update German translation (12 new or changed strings). git-gui: Update translation template git-gui: Remove unused icon file_parttick git-gui: use different icon for new and modified files in the index git-gui: set GIT_DIR and GIT_WORK_TREE after setup git-gui: update shortcut tools to use _gitworktree git-gui: handle bare repos correctly git-gui: handle non-standard worktree locations git-gui: Support applying a range of changes at once git-gui: Add a special diff popup menu for submodules git-gui: Use git diff --submodule when available
2010-01-24Merge branch 'maint' of git://git.spearce.org/git-gui into maintJunio C Hamano5-23/+48
* 'maint' of git://git.spearce.org/git-gui: git-gui: work from the .git dir git-gui: Fix applying a line when all following lines are deletions git-gui: Correct file_states when unstaging partly staged entry git-gui: Fix gitk for branch whose name matches local file git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync git-gui: handle really long error messages in updateindex. git-gui: Add hotkeys for "Unstage from commit" and "Revert changes" git-gui: Makefile: consolidate .FORCE-* targets
2009-12-09Merge git://repo.or.cz/git-guiJunio C Hamano4-13/+37
* git://repo.or.cz/git-gui: git-gui: suppress RenderBadPicture X error caused by Tk bug git-gui: Increase blame viewer usability on MacOS. git-gui: search 4 directories to improve statistic of gc hint git gui: make current branch default in "remote delete branch" merge check
2009-10-27Merge git://repo.or.cz/git-guiJunio C Hamano7-24/+2276
* git://repo.or.cz/git-gui: git-gui: adjust the minimum height of diff pane for shorter screen height git-gui: fix use of uninitialized variable git-gui: store wm state and fix wm geometry git-gui: Ensure submodule path is quoted properly git-gui: fix diff for partially staged submodule changes git-gui: Update russian translation git-gui: Limit display to a maximum number of files git-gui: remove warning when deleting correctly merged remote branch git-gui: Added Greek translation & glossary git-gui: display summary when showing diff of a submodule
2009-05-01Merge git://repo.or.cz/git-guiJunio C Hamano22-657/+1254
* git://repo.or.cz/git-gui: git-gui: Fixes for Mac OS X TkAqua git-gui: Update Russian translation git-gui: run post-checkout hook after clone git-gui: Ensure consistent usage of mergetool.keepBackup git-gui: fix use of undeclared variable diff_empty_count git-gui (Win): make starting via "Git GUI Here" on .git/ possible git-gui (Win): make "Explore Working Copy" more robust git-gui: run post-checkout hook on checkout git-gui: When calling post-commit hook wrong variable was cleared. git-gui: use `git --html-path` to get the location of installed HTML docs git-gui: fix deleting from the context menu with empty selection git-gui: minor spelling fix and string factorisation. git-gui: various French translation fixes git-gui: Fix merge conflict display error when filename contains spaces git-gui: don't hide the Browse button when resizing the repo chooser Append ampersand to "Target" of lnk files created by do_cygwin_shortcut git-gui: Support more git version notations. git-gui: Avoid an infinite rescan loop in handle_empty_diff. git-gui: Fix post-commit status with subject in non-locale encoding
2008-12-17Merge git://repo.or.cz/git-guiJunio C Hamano11-423/+3157
* git://repo.or.cz/git-gui: git-gui 0.12 git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL git-gui: Update Hungarian translation for 0.12 git-gui: Fixed typos in Swedish translation. git-gui: Updated Swedish translation (515t0f0u). git gui: update Italian translation git-gui: Update Japanese translation for 0.12 git-gui: Starting translation for Norwegian git-gui: Update German (completed) translation. git-gui: Update po template to include 'Mirroring %s' message git-gui: Fix commit encoding handling. git-gui: Fix handling of relative paths in blame.
2008-12-02Merge git://repo.or.cz/git-guiJunio C Hamano1-16/+27
* git://repo.or.cz/git-gui: git-gui: Teach start_push_anywhere_action{} to notice when remote is a mirror.
2008-11-30Merge git://repo.or.cz/git-guiJunio C Hamano5-1533/+4243
* git://repo.or.cz/git-gui: git-gui: update Japanese translation git-gui: french translation update Updated Swedish translation (514t0f0u). git gui: update Italian translation Update Hungarian translation. 100% completed.
2008-11-16Merge git://repo.or.cz/git-guiJunio C Hamano7-311/+1457
* git://repo.or.cz/git-gui: git-gui: Fix the search bar destruction handler. Update the po template git-gui: Implement automatic rescan after Tool execution. git-gui: Allow Tools request arguments from the user. git-gui: Add a Tools menu for arbitrary commands. git-gui: Fix the after callback execution in rescan. git-gui: Implement system-wide configuration handling. git-gui: try to provide a window icon under X
2008-11-12Merge git://repo.or.cz/git-guiJunio C Hamano4-17/+41
* git://repo.or.cz/git-gui: git-gui: Request blame metadata in utf-8. git-gui: Add the Show SSH Key item to the clone dialog. git-gui: Fix focus transition in the blame viewer.
2008-11-01Merge git://repo.or.cz/git-guiJunio C Hamano17-190/+1080
* git://repo.or.cz/git-gui: (27 commits) git-gui: Update German translation. git-gui: Do not munge conflict marker lines in a normal diff git-gui: Add a simple implementation of SSH_ASKPASS. git-gui: Add a dialog that shows the OpenSSH public key. git-gui: Mark-up strings in show_{other,unmerged}_diff() for localization git-gui: Show a round number of bytes of large untracked text files git-gui: Fix the blame viewer destroy handler. git-gui: Add a search command to the blame viewer. git-gui: Fix the blame window shape. git-gui: Fix switch statement in lib/merge.tcl git-gui: Fix fetching from remotes when adding them git-gui: Fix removing non-pushable remotes git-gui: Make input boxes in init/clone/open dialogs consistent git-gui: Avoid using the term URL when specifying repositories git-gui: gui.autoexplore makes explorer to pop up automatically after picking git-gui: Add Explore Working Copy to the Repository menu git-gui: Use git web--browser for web browsing git-gui: mkdir -p when initializing new remote repository git-gui: Add support for removing remotes git-gui: Add support for adding remotes ...
2008-09-25Merge git://repo.or.cz/git-guiShawn O. Pearce9-141/+793
* git://repo.or.cz/git-gui: git-gui: Reenable staging unmerged files by clicking the icon. git-gui: Support the encoding menu in gui blame. git-gui: Optimize encoding name resolution using a lookup table. git-gui: Allow forcing display encoding for diffs using a submenu. git-gui: Add a menu of available encodings. git-gui: Cleanup handling of the default encoding. git-gui: Assume `blame --incremental` output is in UTF-8 git-gui: Use gitattribute "encoding" for file content display git-gui: Add support for calling out to the prepare-commit-msg hook git-gui: Hide commit related UI during citool --nocommit git-gui: Add more integration options to citool. git-gui: Updated German translation. git-gui: I18n fix sentence parts into full sentences for translation again. git-gui: Restore ability to Stage Working Copy for conflicts. git-gui: Fix Blame Parent & Context for working copy lines.
2008-09-06Merge updated git-gui and gitk that call each otherJunio C Hamano8-119/+900
Merge git://repo.or.cz/git-gui and git://git.kernel.org/pub/scm/gitk/gitk * git://repo.or.cz/git-gui: git-gui: Show special diffs for complex conflict cases. git-gui: Make F5 reselect a diff, if an untracked file is selected. git-gui: Reimplement and enhance auto-selection of diffs. git-gui: Support conflict states _U & UT. git-gui: Support more merge tools. git-gui: Don't allow staging files with conflicts. git-gui: Support calling merge tools. git-gui: Support resolving conflicts via the diff context menu. git-gui: Mark forgotten strings for translation. git-gui: Allow specifying an initial line for git gui blame. git-gui: Better positioning in Blame Parent Commit git-gui: Support passing blame to a parent commit. git-gui: Support starting gitk from Gui Blame git-gui: Teach git gui about file type changes * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Add menu item for calling git gui blame gitk: Add option to specify the default commit on command line
2008-09-06Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano5-381/+431
* 'maint' of git://repo.or.cz/git-gui: git-gui: Fix diff parsing for lines starting with "--" or "++" git-gui: Fix string escaping in po2msg.sh git gui: show diffs with a minimum of 1 context line git-gui: update all remaining translations to French. git-gui: Update french translation
2008-08-17Merge git-gui 0.11.0Junio C Hamano1-1/+1
2008-08-06Merge git://repo.or.cz/git-guiJunio C Hamano7-999/+1211
* git://repo.or.cz/git-gui: git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core' git-gui: add a part about format strings in po/README git-gui: update po/it.po git-gui: update Japanese translation git-gui: Update swedish translation. git-gui: Update git-gui.pot for 0.11 nearing release git-gui: Update German translation
2008-07-30Merge git://repo.or.cz/git-guiJunio C Hamano4-11/+36
* git://repo.or.cz/git-gui: git-gui (Windows): Change wrapper to execdir 'libexec/git-core' git-gui (Windows): Switch to relative discovery of oguilib git-gui: Correct installation of library to be $prefix/share git-gui: Fix gitk search in $PATH to work on Windows git-gui: Preserve scroll position on reshow_diff. git-gui: Fix the Remote menu separator.
2008-07-27Merge git://repo.or.cz/git-guiJunio C Hamano5-21/+178
* git://repo.or.cz/git-gui: git-gui: "Stage Line": Treat independent changes in adjacent lines better git-gui: Fix "Stage/Unstage Line" with one line of context. git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core Add a menu item to invoke full copy detection in blame. Kill the blame back-end on window close. Add options to control the search for copies in blame. Fix pre-commit hooks under MinGW/MSYS
2008-07-15Merge git://repo.or.cz/git-guiJunio C Hamano2-3/+8
* git://repo.or.cz/git-gui: git-gui: MERGE_RR lives in .git/ directly with newer Git versions git-gui: Exit shortcut in MacOSX repaired
2008-07-06Merge git://repo.or.cz/git-guiJunio C Hamano2-3/+125
* git://repo.or.cz/git-gui: git-gui: Implement "Stage/Unstage Line" git-gui: Don't select the wrong file if the last listed file is staged. git-gui: Fix accidental staged state toggle when clicking top pixel row git-gui: Move on to the next filename after staging/unstaging a change
2008-05-26Merge git://repo.or.cz/git-guiJunio C Hamano2-30/+48
* git://repo.or.cz/git-gui: git-gui: Vertically align textboxes with labels git-gui: Handle workdir detection when CYGWIN=nowinsymlinks git-gui: Add a --trace command line option
2008-05-15Merge git://repo.or.cz/git-guiJunio C Hamano7-25/+49
* git://repo.or.cz/git-gui: git-gui: Delete branches with 'git branch -D' to clear config git-gui: Setup branch.remote,merge for shorthand git-pull git-gui: Update German translation git-gui: Don't use '$$cr master' with aspell earlier than 0.60 git-gui: Report less precise object estimates for database compression
2008-04-04Merge git://repo.or.cz/git-guiJunio C Hamano2-51/+45
* git://repo.or.cz/git-gui: git-gui: use +/- instead of ]/[ to show more/less context in diff git-gui: Update french translation git-gui: Switch keybindings for [ and ] to bracketleft and bracketright
2008-04-02Merge git://repo.or.cz/git-guiJunio C Hamano2-9/+33
* git://repo.or.cz/git-gui: git-gui 0.10 git-gui: Add shortcut keys for Show More/Less Context
2008-03-15Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano12-2431/+3155
* 'master' of git://repo.or.cz/git-gui: git-gui: Improve directions regarding POT update in po/README git-gui: Update Japanese translation git-gui: Adjusted Japanese translation to updated POT git-gui: Update Japanese translation git-gui: Don't translate the special Apple menu git-gui: Updated Hungarian translation (e5fba18) git-gui: update russian translation git-gui: remove spurious "fuzzy" attributes in po/it.po git-gui: updated Swedish translation git-gui: Regenerated po template and merged translations with it Update Hungarian translation. 100% completed. git-gui: update Italian translation
2008-03-11Merge git://repo.or.cz/git-guiJunio C Hamano9-573/+724
* git://repo.or.cz/git-gui: git-gui: Simplify MSGFMT setting in Makefile git-gui: Add option for changing the width of the commit message text box git-gui: if a background colour is set, set foreground colour as well git-gui: translate the remaining messages in zh_cn.po to chinese
2008-03-07Merge branch 'maint'Junio C Hamano1-0/+5
* maint: unquote_c_style: fix off-by-one. test-lib: fix TERM to dumb for test repeatability config.txt: refer to --upload-pack and --receive-pack instead of --exec git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-03-06Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano1-0/+5
* 'maint' of git://repo.or.cz/git-gui: git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-02-29Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano5-45/+139
* 'master' of git://repo.or.cz/git-gui: git-gui: fix typo in lib/spellcheck.tcl git-gui: Shorten Aspell version strings to just Aspell version number git-gui: Gracefully display non-aspell version errors to users git-gui: Catch and display aspell startup failures to the user git-gui: Only bind the spellcheck popup suggestion hook once git-gui: Remove explicit references to 'aspell' in message strings git-gui: Ensure all spellchecker 'class' variables are initialized git-gui: Update German translation. git-gui: (i18n) Add newly added translation strings to template.
2008-02-29Merge branch 'maint'Junio C Hamano1-1/+1
* maint: Documentation cherry-pick: Fix cut-and-paste error git.el: find the git-status buffer whatever its name is git-gui: Paper bag fix info dialog when no files are staged at commit
2008-02-29Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano1-1/+1
* 'maint' of git://repo.or.cz/git-gui: git-gui: Paper bag fix info dialog when no files are staged at commit
2008-02-23Sync with 1.5.4.3Junio C Hamano4-10/+36
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-23Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano5-15/+50
* 'maint' of git://repo.or.cz/git-gui: git-gui: Focus insertion point at end of strings in repository chooser git-gui: Avoid hardcoded Windows paths in Cygwin package files git-gui: Default TCL_PATH to same location as TCLTK_PATH git-gui: Paper bag fix error dialogs opening over the main window git-gui: Ensure error dialogs always appear over all other windows git-gui: relax "dirty" version detection git-gui: support Git Gui.app under OS X 10.5
2008-02-16Merge git://repo.or.cz/git-guiJunio C Hamano2-4/+2
* git://repo.or.cz/git-gui: git-gui: Correct size of dictionary name widget in options dialog git-gui: Paper bag fix bad string length call in spellchecker
2008-02-13Merge git://repo.or.cz/git-guiJunio C Hamano12-84/+618
* git://repo.or.cz/git-gui: git-gui: Automatically spell check commit messages as the user types git-gui: support Git Gui.app under OS X 10.5 git-gui: Update German translation. git-gui: (i18n) Fix a bunch of still untranslated strings.
2008-01-23Merge git://repo.or.cz/git-guiJunio C Hamano3-5/+28
* git://repo.or.cz/git-gui: git-gui: Correctly cleanup msgfmt '1 message untranslated' output git-gui: Make the statistics of po2msg match those of msgfmt git-gui: Fallback to Tcl based po2msg.sh if msgfmt isn't available git-gui: Work around random missing scrollbar in revision list
2008-01-20Merge git://repo.or.cz/git-guiJunio C Hamano4-76/+145
* git://repo.or.cz/git-gui: git-gui: Correct encoding of glossary/fr.po to UTF-8 git-gui: Consolidate hook execution code into a single function git-gui: Correct window title for hook failure dialogs git-gui: Honor the standard commit-msg hook
2008-01-20Merge git://repo.or.cz/git-guiJunio C Hamano11-71/+2119
* git://repo.or.cz/git-gui: git-gui: Makefile - Handle $DESTDIR on Cygwin git-gui: add french glossary: glossary/fr.po git-gui: Refresh file status description after hunk application git-gui: Allow 'Create New Repository' on existing directories git-gui: Initial french translation git-gui: Improve German translation. git-gui: Updated Swedish translation after mailing list review. git-gui: Fix broken revert confirmation. git-gui: Update German translation git-gui: Update glossary: add term "hunk"
2008-01-04Merge git://repo.or.cz/git-guiJunio C Hamano5-28/+1922
* git://repo.or.cz/git-gui: git-gui: Make commit log messages end with a newline Added Swedish translation. git-gui: Unconditionally use absolute paths with Cygwin git-gui: Handle file mode changes (644->755) in diff viewer git-gui: Move frequently used commands to the top of the context menu.
2007-12-06Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano9-1057/+1248
* 'master' of git://repo.or.cz/git-gui: Update Hungarian translation. 100% completed. Update ja.po for git-gui git-gui: Improve the application icon on Windows. git-gui: install-sh from automake does not like -m755 git-gui: Reorder msgfmt command-line arguments Update German translation. 100% completed. Update git-gui.pot with latest (few) string additions and changes. git-gui: update it.po and glossary/it.po git-gui: fix a typo in lib/commit.tcl
2007-11-21Merge git://repo.or.cz/git-guiJunio C Hamano53-892/+16419
* git://repo.or.cz/git-gui: (96 commits) git-gui 0.9.0 git-gui: Bind Meta-T for "Stage To Commit" menu action git-gui: Allow users to set font weights to bold git-gui: Update Japanese strings (part 2) git-gui: Update Japanese strings Updated russian translation of git-gui po2msg: actually output statistics po2msg: ignore untranslated messages po2msg: ignore entries marked with "fuzzy" git-gui: Protect against bad translation strings git-gui: Make sure we get errors from git-update-index More updates and corrections to the russian translation of git-gui Updated Russian translation. git-gui: Update German translation git-gui: Add more terms to glossary. git-gui: Paper bag fix the global config parsing git-gui: Honor a config.mak in git-gui's top level git-gui: Collapse $env(HOME) to ~/ in recent repositories on Windows git-gui: Support cloning Cygwin based work-dirs git-gui: Use proper Windows shortcuts instead of bat files ...
2007-10-20Merge branch 'maint' of git://repo.or.cz/git-gui into maintShawn O. Pearce4-11/+73
* 'maint' of git://repo.or.cz/git-gui: git-gui: Don't display CR within console windows git-gui: Handle progress bars from newer gits git-gui: Correctly report failures from git-write-tree git-gui: accept versions containing text annotations, like 1.5.3.mingw.1 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 git-gui: Ensure .git/info/exclude is honored in Cygwin workdirs git-gui: Handle starting on mapped shares under Cygwin git-gui: Display message box when we cannot find git in $PATH git-gui: Avoid using bold text in entire gui for some fonts
2007-09-17Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano8-45/+293
* 'maint' of git://repo.or.cz/git-gui: git-gui: Disable native platform text selection in "lists" git-gui: Paper bag fix "Commit->Revert" format arguments git-gui: Provide 'uninstall' Makefile target to undo an installation git-gui: Font chooser to handle a large number of font families git-gui: Make backporting changes from i18n version easier git-gui: Don't delete send on Windows as it doesn't exist git-gui: Trim trailing slashes from untracked submodule names git-gui: Assume untracked directories are Git submodules git-gui: handle "deleted symlink" diff marker git-gui: show unstaged symlinks in diff viewer git-gui: Avoid use of libdir in Makefile git-gui: Disable Tk send in all git-gui sessions git-gui: lib/index.tcl: handle files with % in the filename properly git-gui: Properly set the state of "Stage/Unstage Hunk" action git-gui: Fix detaching current branch during checkout git-gui: Correct starting of git-remote to handle -w option
2007-08-26Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano3-66/+97
* 'master' of git://repo.or.cz/git-gui: git-gui: Correct 'git gui blame' in a subdirectory git-gui: Do not offer to stage three-way diff hunks into the index git-gui: Refactor diff pane popup support for future improvements git-gui: Fix "unoptimized loading" to not cause git-gui to crash git-gui: Paper bag fix "Stage Hunk For Commit" in diff context menu git-gui: Allow git-merge to use branch names in conflict markers git-gui: Fix window manager problems on ion3
2007-08-19Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano1-1/+6
* 'master' of git://repo.or.cz/git-gui: git-gui: Added support for OS X right click git-gui: Avoid Tcl error in popup menu on diff viewer
2007-07-29Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano13-428/+1132
* 'master' of git://repo.or.cz/git-gui: (50 commits) git-gui: Minor refactoring of merge command line in merge support git-gui: Use more modern looking icons in the tree browser git-gui: Don't offer to stage hunks from untracked files git-gui: Make sure remotes are loaded when picking revisions git-gui: Use progress bar while resetting/aborting files git-gui: Honor core.excludesfile when listing extra files git-gui: Unify wording to say "to stage" instead of "to add" git-gui: Don't kill modified commit message buffer with merge templates git-gui: Remove usernames from absolute SSH urls during merging git-gui: Format tracking branch merges as though they were pulls git-gui: Cleanup bindings within merge dialog git-gui: Replace merge dialog with our revision picker widget git-gui: Show ref last update times in revision chooser tooltips git-gui: Display commit/tag/remote info in tooltip of revision picker git-gui: Save remote urls obtained from config/remotes setup git-gui: Avoid unnecessary symbolic-ref call during checkout git-gui: Refactor current branch menu items to make i18n easier git-gui: Refactor diff popup into a procedure to ease i18n work git-gui: Paper bag fix quitting crash after commit git-gui: Clarify meaning of add tracked menu option ...
2007-07-12Merge commit 'git-gui/master'Junio C Hamano23-888/+2210
* commit 'git-gui/master': (36 commits) git-gui: Change prior tree SHA-1 verification to use git_read git-gui: Include a space in Cygwin shortcut command lines git-gui: Use sh.exe in Cygwin shortcuts git-gui: Paper bag fix for Cygwin shortcut creation git-gui: Improve the Windows and Mac OS X shortcut creators git-gui: Teach console widget to use git_read git-gui: Perform our own magic shbang detection on Windows git-gui: Treat `git version` as `git --version` git-gui: Assume unfound commands are known by git wrapper git-gui: Correct gitk installation location git-gui: Always use absolute path to all git executables git-gui: Show a progress meter for checking out files git-gui: Change the main window progress bar to use status_bar git-gui: Extract blame viewer status bar into mega-widget git-gui: Allow double-click in checkout dialog to start checkout git-gui: Default selection to first matching ref git-gui: Unabbreviate commit SHA-1s prior to display git-gui: Refactor branch switch to support detached head git-gui: Refactor our ui_status_value update technique git-gui: Better handling of detached HEAD ...
2007-06-28Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano3-21/+59
* 'master' of git://repo.or.cz/git-gui: git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hack git-gui: Don't nice git blame on MSYS as nice is not supported git-gui: Don't require $DISPLAY just to get --version git-gui: Quiet our installation process git-gui: Bind Tab/Shift-Tab to cycle between panes in blame git-gui: Correctly install to /usr/bin on Cygwin
2007-06-12Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano8-12/+28
* 'master' of git://repo.or.cz/git-gui: git-gui: Save geometry before the window layout is damaged git-gui: Give amend precedence to HEAD over MERGE_MSG git-gui: Include 'war on whitespace' fixes from git.git
2007-06-11Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano7-52/+601
* 'master' of git://repo.or.cz/git-gui: git-gui: Internalize symbolic-ref HEAD reading logic git-gui: Expose the merge.diffstat configuration option git-gui: Allow users to delete remote branches git-gui: Allow users to rename branches through 'branch -m' git-gui: Disable tearoff menus on Windows, Mac OS X git-gui: Provide fatal error if library is unavailable git-gui: Enable verbose Tcl loading earlier git-gui: Show the git-gui library path in 'About git-gui' git-gui: GUI support for running 'git remote prune <name>' git gui 0.8.0
2007-06-11Merge branch 'maint'Junio C Hamano5-219/+825
* maint: (46 commits) git-gui: Changed blame header bar background to match main window git-gui: Favor the original annotations over the recent ones git-gui: Improve our labeling of blame annotation types git-gui: Use three colors for the blame viewer background git-gui: Jump to original line in blame viewer git-gui: Display both commits in our tooltips git-gui: Run blame twice on the same file and display both outputs git-gui: Display the "Loading annotation..." message in italic git-gui: Rename fields in blame viewer to better descriptions git-gui: Label the uncommitted blame history entry git-gui: Switch internal blame structure to Tcl lists git-gui: Cleanup redundant column management in blame viewer git-gui: Better document our blame variables git-gui: Remove unused commit_list from blame viewer git-gui: Automatically expand the line number column as needed git-gui: Make the line number column slightly wider in blame git-gui: Use lighter colors in blame view git-gui: Remove unnecessary space between columns in blame viewer git-gui: Remove the loaded column from the blame viewer git-gui: Clip the commit summaries in the blame history menu ...
2007-06-11Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano5-219/+825
* 'maint' of git://repo.or.cz/git-gui: (46 commits) git-gui: Changed blame header bar background to match main window git-gui: Favor the original annotations over the recent ones git-gui: Improve our labeling of blame annotation types git-gui: Use three colors for the blame viewer background git-gui: Jump to original line in blame viewer git-gui: Display both commits in our tooltips git-gui: Run blame twice on the same file and display both outputs git-gui: Display the "Loading annotation..." message in italic git-gui: Rename fields in blame viewer to better descriptions git-gui: Label the uncommitted blame history entry git-gui: Switch internal blame structure to Tcl lists git-gui: Cleanup redundant column management in blame viewer git-gui: Better document our blame variables git-gui: Remove unused commit_list from blame viewer git-gui: Automatically expand the line number column as needed git-gui: Make the line number column slightly wider in blame git-gui: Use lighter colors in blame view git-gui: Remove unnecessary space between columns in blame viewer git-gui: Remove the loaded column from the blame viewer git-gui: Clip the commit summaries in the blame history menu ...
2007-06-07War on whitespaceJunio C Hamano2-3/+0
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-05-28Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano2-10/+19
* 'maint' of git://repo.or.cz/git-gui: git-gui: Guess our share/git-gui/lib path at runtime if possible Correct key bindings to Control-<foo> git-gui: Tighten internal pattern match for lib/ directory
2007-05-17Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano2-4/+44
* 'master' of git://repo.or.cz/git-gui: git-gui: Gracefully handle bad TCL_PATH at compile time
2007-05-10Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano9-345/+513
* 'master' of git://repo.or.cz/git-gui: git gui 0.7.0 git-gui: Paperbag fix blame in subdirectory git-gui: Format author/committer times in ISO format git-gui: Cleanup minor nits in blame code git-gui: Generate blame on uncommitted working tree file git-gui: Smarter command line parsing for browser, blame git-gui: Use prefix if blame is run in a subdirectory git-gui: Convert blame to the "class" way of doing things git-gui: Don't attempt to inline array reads in methods git-gui: Convert browser, console to "class" format git-gui: Define a simple class/method system git-gui: Allow shift-{k,j} to select a range of branches to merge git-gui: Call changes "Staged" and "Unstaged" in file list titles.
2007-05-07Merge branch 'master' of git://repo.or.cz/git-guiShawn O. Pearce17-4016/+3996
* 'master' of git://repo.or.cz/git-gui: git-gui: Use vi-like keys in merge dialog git-gui: Include commit id/subject in merge choices git-gui: Show all possible branches for merge git-gui: Move merge support into a namespace git-gui: Allow vi keys to scroll the diff/blame regions git-gui: Move console procs into their own namespace git-gui: Refactor into multiple files to save my sanity git-gui: Track our own embedded values and rebuild when they change git-gui: Refactor to use our git proc more often git-gui: Use option database defaults to set the font git-gui: Cleanup common font handling for font_ui git-gui: Correct line wrapping for too many branch message git-gui: Warn users before making an octopus merge git-gui: Include the subject in the status bar after commit Also perform an evil merge change to update Git's main Makefile to pass the proper options down into git-gui now that it depends on reasonable values for 'sharedir' and 'TCL_PATH'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-07Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano1-20/+26
* 'master' of git://repo.or.cz/git-gui: git-gui: Correctly handle UTF-8 encoded commit messages
2007-05-07Merge branch 'maint'Junio C Hamano1-1/+1
* maint: Documentation: don't reference non-existent 'git-cvsapplycommit' user-manual: stop deprecating the manual user-manual: miscellaneous editing user-manual: fix .gitconfig editing examples user-manual: clean up fast-forward and dangling-objects sections user-manual: add section ID's user-manual: more discussion of detached heads, fix typos git-gui: Allow spaces in path to 'wish' gitk: Allow user to choose whether to see the diff, old file, or new file
2007-05-07Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano1-1/+1
* 'maint' of git://repo.or.cz/git-gui: git-gui: Allow spaces in path to 'wish'
2007-04-17Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano2-74/+91
* 'master' of git://repo.or.cz/git-gui: git-gui: Honor TCLTK_PATH if supplied Revert "Allow wish interpreter to be defined with TCLTK_PATH" git-gui: Display the directory basename in the title git-gui: Brown paper bag fix division by 0 in blame Always bind the return key to the default button Do not break git-gui messages into multiple lines. Improve look-and-feel of the git-gui tool. Teach git-gui to use the user-defined UI font everywhere. Allow wish interpreter to be defined with TCLTK_PATH
2007-04-17Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano1-4/+6
* 'maint' of git://repo.or.cz/git-gui: git-gui: Brown paper bag fix division by 0 in blame
2007-03-12Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano1-0/+5
* 'master' of git://repo.or.cz/git-gui: git-gui: Support of "make -s" in: do not output anything of the build itself
2007-03-12Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano4-156/+15
* 'maint' of git://repo.or.cz/git-gui: git-gui: Allow 'git gui version' outside of a repository git-gui: Revert "git-gui: Display all authors of git-gui." git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed." git-gui: Allow committing empty merges
2007-03-06Merge branch 'master' of git://repo.or.cz/git-gui into maintJunio C Hamano2-37/+69
* 'master' of git://repo.or.cz/git-gui: git-gui: Make 'make' quieter by default git-gui: Remove unnecessary /dev/null redirection. git-gui: Don't create empty (same tree as parent) commits. git-gui: Add Reset to the Branch menu. git-gui: Relocate the menu/transport menu code.
2007-02-24Merge git://repo.or.cz/git-gui into maintJunio C Hamano1-6/+19
* git://repo.or.cz/git-gui: Don't modify CREDITS-FILE if it hasn't changed.
2007-02-21Merge branch 'master' of git://repo.or.cz/git-gui into maintJunio C Hamano6-120/+308
* 'master' of git://repo.or.cz/git-gui: git-gui: Don't crash in citool mode on initial commit. git-gui: Remove TODO list. git-gui: Include browser in our usage message. git-gui: Change summary of git-gui. git-gui: Display all authors of git-gui. git-gui: Use mixed path for docs on Cygwin. git-gui: Correct crash when saving options in blame mode. git-gui: Expose the browser as a subcommand. git-gui: Create new branches from a tag. git-gui: Prefer version file over git-describe. git-gui: Print version on the console. git-gui: More consistently display the application name. git-gui: Permit merging tags into the current branch. git-gui: Basic version check to ensure git 1.5.0 or later is used. git-gui: Refactor 'exec git subcmd' idiom.
2007-02-13Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano1-1/+1
* 'master' of git://repo.or.cz/git-gui: git-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not "/devnull"
2007-02-12Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano3-19/+58
* 'master' of git://repo.or.cz/git-gui: git-gui: Change base version to 0.6. git-gui: Guess our version accurately as a subproject. git-gui: Handle gitgui tags in version gen. git-gui: Generate a version file on demand. git-gui: Rename GIT_VERSION to GITGUI_VERSION. git-gui: Allow gitexecdir, INSTALL to be set by the caller.
2007-02-11Merge git-guiJunio C Hamano5-0/+6065
This merges git-gui project of Shawn as a subproject of git.git at git-gui/ subdirectory. This merge only melds two histories together. The toplevel Makefile does not even know about git-gui yet. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21git-gui: Modified makefile to embed version into git-gui script.Shawn O. Pearce1-3772/+0
We want to embed the version of git-gui directly into the script file, so that we can display it properly in the about dialog. Consequently I've refactored the Makefile process to act like the one in core git.git with regards to shell scripts, allowing git-gui to be constructed by a sed replacement performed on git-gui.sh. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Hide the ugly bash command line from the windows desktop icon.Shawn O. Pearce1-1/+1
The user really doesn't need to see the technical details of how we launch git-gui from within their "desktop icon". Instead we should hide the command line from being displayed when the icon launches by putting @ at the start of the line. If they really need to see the command we are running they can edit the batch file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Change more 'include' language to 'add'.Shawn O. Pearce1-7/+7
I just found a whole slew of places where we still were using the term 'include' rather than 'add' to refer to the act of updating the index with modifications from the working directory. To be consistent with all Git documentation and command line tools, these should be 'add'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Work around odd cygpath bug on Windows.Shawn O. Pearce1-1/+1
There appears to be a bug on one of my test systems where cygpath with the --long-name option is generating a corrupt string that does not actually refer to sh.exe. This breaks any desktop icon created by git-gui as the executable we are trying to invoke does not exist. Since Cygwin is typically installed as C:\cygwin long path names is probably not actually necessary to link to the shell. I also added a small echo to the start of the icon script, as it can take one of my test systems several seconds to startup git-gui. This way the user knows we're starting git-gui, and was politely asked to wait for the action to complete. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Correct wording of the revert confirmation dialog.Shawn O. Pearce1-2/+2
We no longer describe updating the index as including changes, as we now use the add notation used by core Git's command line tools. So its confusing to be talking about unincluded changes within the revert dialog. Instead we should used language like 'unadded changes'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Corrected behavior of deleted (but existing in HEAD) files.Shawn O. Pearce1-0/+2
Apparently I did not account for the D_ file state. This can occur when a file has been marked for deletion by deleting it from the index, and the file also does not exist in the working directory. Typically this happens when the user deletes the file, hits Rescan, then includes the missing file in the commit, then hits Rescan again. We don't find the file in the working directory but its been removed in the index, so the state becomes D_. This state should be identical with DD. I'm not entirely sure why DD occurs sometimes and D_ others, it would seem like D_ is the state that should be happening instead of DD, leading me to believe there is a quirk in git-gui's state manipulation code. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Run git-gc rather than git-repack.Shawn O. Pearce1-9/+5
Now that git 1.5.0-rc1 and later has a 'git gc' command which performs all important repository management activites (including reflog pruning, repacking local objects, unnecessary loose object pruning and rerere cache expiration) we should run 'gc' when the user wants us to cleanup their object database for them. I think the name 'gc' is horrible for a GUI application like git-gui, so I'm labeling the menu action 'Compress Database' instead. Hopefully this will provide some clue to the user about what the action does. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Show all fetched branches for remote pulls.Shawn O. Pearce1-8/+9
Loop through every remote.<name>.fetch entry and add it as a valid option in the Pull menu. This way users can pull any remote branch that they track, without needing to leave the gui. Its a rather crude work around for not having a full merge interface. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Created very crude Tools menu, to support miga.Shawn O. Pearce1-0/+29
In one particular case I have a tool called 'miga' which users may need to invoke on their repository. This is a homegrown tool which is not (and should be) part of git-gui, but I still want to be able to run it from within the gui. Right now I'm taking a shortcut and adding it to the Tools menu if we are not on Mac OS X and the support script used to launch the tool exists in the local filesystem. This is nothing but a complete and utter hack. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-21git-gui: Reworded 'Include' to 'Add' to match core Git.Shawn O. Pearce1-3/+3
Now that git-add is a first class citizen in core Git (Nico's 366bfcb6) users may start to expect the term 'add' to refer to the act of including a file's changes into a commit. So I'm replacing all uses of the term 'Include' in the UI with 'Add'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-27git-gui: Auto-update any A? or M? files during rescan.Shawn O. Pearce1-2/+2
If the user has partial includes disabled then it doesn't matter what state the working directory is in; if the file has been included in the next commit its index state is A or M and we should immediately run update-index on the working directory file to bring the index in sync with the working directory. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-27git-gui: Enable resolution of merge conflicts.Shawn O. Pearce1-0/+3
If a file has a merge conflict (index state = U) the user will need to run update-index on that file to resolve all stages down to stage 0, by including the file in the working directory. Like core Git we'll just trust the user that their resolution is correct, and that they didn't just include the file into the commit while merge conflicts still exist within the file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Set a proper title on our revert confirm dialog box.Shawn O. Pearce1-2/+7
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Started implementation of switch_branch.Shawn O. Pearce1-1/+50
This implementation of switch_branch is not yet finished, and thus it throws a "NOT FINISHED" error rather than completing the switch. But its a rough sketch of the procedure required. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Misc. comment and formatting cleanups.Shawn O. Pearce1-7/+10
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Rename all_branches -> all_heads.Shawn O. Pearce1-8/+8
Since this list is really the set of refs which match "refs/heads/*" it really is the set of heads and not necessarily the set of all branches, as the remote tracking branches are not listed in this set, even if it appears in the "refs/heads/*" namespace (e.g. an old style repository). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Automatically skip tracking branches in branch menu.Shawn O. Pearce1-9/+37
Since the user should not work on a tracking branch we automatically hide any branch which is used as a tracking branch by either a remote.<name>.fetch config entry or by a Pull: line in a remotes file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Abort on not implemented branch switching.Shawn O. Pearce1-1/+5
I'm not currently ready to implement branch switching, so I'm just going to punt on it for now. :-) Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-25git-gui: Parse off refs/remotes when showing current branch.Shawn O. Pearce1-1/+1
Even though the user shouldn't have a remote branch checked out, if they do we should still show as short of the branch name as possible. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-24git-gui: Created Branch menu.Shawn O. Pearce1-0/+61
This is an early start at branch management from within git-gui. The branch menu has create/delete command entries to create and delete branches as well as a list of radiobutton entries for each branch found in the repository through for-each-ref. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-24git-gui: Support file state MD (modified/deleted).Shawn O. Pearce1-0/+3
Apparently I missed the file state MD, which is a file modified and updated in the index but then removed from the working directory. This should be treated just like AD, an added file which has been deleted from the working directory. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-24git-gui: Display the current branch.Shawn O. Pearce1-1/+30
Users want to know what branch they are sitting on before making a commit, as they may need to switch to a different branch first. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-23git-gui: Added revert changes command.Shawn O. Pearce1-7/+177
Users sometimes need to be able to throw away locally modified files in order to go back to the last committed version of that file. To perform a revert the user must first uninclude each file from the new commit as the working file must at least partially match the index, and we use git-checkout-index to update the working directory. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-22git-gui: Improve pull error dialogs.Shawn O. Pearce1-7/+11
Just like prior to a commit its only an informational message that we refuse to perform a pull on a dirty working directory. Therefore we should not use an error icon. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Don't start 'gitk --all' on Mac OS X.Shawn O. Pearce1-4/+6
Since gitk is currently broken on Mac OS X and is unable to start itself when given command line parameters just don't offer the "Visual All Branches" menu option on Mac OS X. Once this feature of gitk is fixed we should change this section of code to make sure a working version of gitk will be executed before we offer the option up to the user. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Added menu command to visualize all branches.Shawn O. Pearce1-13/+26
Sometimes its useful to start gitk with the --all option, to view all of the known branches and tags within this repository. Rather than making the user startup gitk and then edit the view we can pass the option along for them. This also makes it slightly more explicit, that when gitk starts up by default its showing the current branch and not everything. Yes gitk isn't showing that to the user, but the fact that the user had to make a decision between seeing this current branch or all branches will hopefully make them study gitk's display before jumping to a conclusion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Refactor M1 binding selection.Shawn O. Pearce1-2/+3
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Warn Cygwin users about possible environment issues.Shawn O. Pearce1-1/+81
Because the Tcl binary distributed with Cygwin tends to not pass along its own environment (the env array) to its children, its unlikely that any Git commands spawned by git-gui will receive the same environment variables that git-gui itself received from the shell which started it. If the user is counting on environment variables to pass down, like say GIT_INDEX_FILE, they may not, so we warn them during git-gui startup that things may not work out as the user intended. Perhaps one day when git-gui and git are running on native Windows (rather than through the Cygwin emulation layers) things will work better. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Correct is_MacOSX platform test.Shawn O. Pearce1-3/+1
Darwn based UNIX systems are not necessarily Mac OS X. However the only windowing system used by Tk that is Mac OS X is 'aqua', and only 'aqua' exists on Mac OS X. Therefore this is a more reliable test for the Macintosh platform. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Abstract out windows platform test to is_Windows proc.Shawn O. Pearce1-14/+20
Like the is_MacOSX proc we shouldn't keep repeating the platform test for Windows. Instead abstract the code out into a procedure and use the procedure whenever we need to do something special. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Include the Tcl/Tk version in the about dialog.Shawn O. Pearce1-3/+12
Users may need to know what version of Tcl they are running git-gui under, in case there is an interesting interface quirk or other compatability problem we don't know about right now that we may need to explore (and maybe fix). Since its simple enough to show a line with this version data we should do so. We also try to reduce the amount of text shown as often the Tcl and Tk version numbers will be identical; when this happens we should only show the one version number. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Make the copyright notice serve double duty.Shawn O. Pearce1-10/+11
The copyright notice we display in the about dialog should be the same as the one at the top of our source code. By putting the copyright notice that appears at the top of our source code into a global variable rather than a comment we can trivially make them the same at all times. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Be more Macintosh like.Shawn O. Pearce1-11/+29
It is tradition for applications to store their about and preferences menu options within the application menu. This is the first menu in the menu bar, just after the apple menu. Apparently the way to access this menu from Tk on Mac OS X systems is to create a special menu whose name ends in ".apple" and place it into the menu bar. So now if we are on Mac OS X we move our about menu and our options menu into the application menu, like other Mac OS X applications. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Added about dialog box.Shawn O. Pearce1-0/+58
Created a help menu with an about dialog box. This about dialog shows the copyright notice for the application, the fact that it is covered by the GPL v2.0 or later, the authors, and the current version of Git it is invoking when users perform actions within it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Rename Project menu to Repository.Shawn O. Pearce1-12/+12
Since all of the actions in our Project menu actually apply to the Git concept of a repository, it is a disservice to our users to call it "project". This is especially true if Git ever gets any sort of subproject support, as the term would then most definately conflict. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Seperate out the database operations in project menu.Shawn O. Pearce1-0/+4
The project menu is just too cluttered without using separator entries to split out the database operations (such as repack and verify) from the other options in the same menu. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Reworded verify console title.Shawn O. Pearce1-2/+4
It would be something of a disservice to our users if we refer to fsck-objects as "verify". So instead we call it fsck-objects in the console title, and indicate that's how we are verifying the object database. We probably should call our menu option "fsck-objects" or similar but I really do think that "Verify Database" more accurately describes the action then "fsck-objects" does, especially to users who aren't file system developers. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Don't save amended commit message buffer.Shawn O. Pearce1-8/+10
Because we don't automatically restart in amend mode when we quit while in amend mode the commit message buffer shouldn't be saved to GITGUI_MSG as it would be misleading when the user restarts the application. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Allow users to run fsck-objects from the gui.Shawn O. Pearce1-0/+13
I recently found a need to run fsck-objects in a number of repositories that I also use git-gui against. Tossing in a menu option to invoke fsck-objects and have its output show up in a console window is simple enough to do. We probably need to enhance the console window used by fsck-objects, like to open up the Git fsck-objects manual page and let the user see what each message means (such as "dangling commit") and to also let the user invoke prune, to cleanup any such dangling objects. But right now I'm going to ignore that problem in favor of getting other more important features implemented. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-21git-gui: Improve handling of merge commits.Shawn O. Pearce1-63/+78
Its useful to be able to amend the last commit even if it was a merge commit, so we really should support that in the gui. We now do so by making PARENT a list. We always diff against the first parent but we create a commit consisting of the parent(s) listed in this list, in order. We also should recheck the repository state during an amend. Earlier I was bitten by this exact bug when I switched branches through a command prompt and then did not do a rescan in git-gui. When I hit "Amend Last Commit" I was surprised to see information from the prior branch appear. This was due to git-gui caching the data from the last rescan and using that data form the amend data load request, rather than the data of the current branch. Improved error text in the dialogs used to tell the user why an amend is being refused by git-gui. In general this is only during an initial commit (nothing prior to amend) and during a merge commit (it is simply too confusing to amend the last commit while also trying to complete a merge). Fixed a couple of minor bugs in the pull logic. Since this code isn't really useful nobody has recently tested it and noticed the breakage. It really needs to be rewritten anyway. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Correct some state matchings for include/remove.Shawn O. Pearce1-4/+5
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Update in memory states after commit.Shawn O. Pearce1-14/+24
In order to allow the user to toggle include/exclude from next commit for files which were partially included in the last commit we need the current index mode+sha1 data stored in our file_states array. For any partially included file we have this information from diff-files, so we just have to copy it over to the diff-index portion of our state array. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Restore the all important shebang line.Shawn O. Pearce1-0/+1
Accidentally removed by an unnoticed fat finger accident in vi during commit 1461c5f3. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Refactored diff line display formatting logic.Shawn O. Pearce1-37/+43
The tags used for diff formatting (which I inherited from gitool) just didn't make a whole lot of sense, especially if you wanted to try to match them to the diff output you were seeing on screen. It did not help that the diff-index -c output's first two columns are also munged to make the diff output more user friendly. So this is a large refactoring of the tags used for diff display. Now our tag names match what we put in the left column of each line, which makes it easier to correlate presentation and implementation. I removed bold font usage from everything except the hunk headers as I really did not like the way bold font caused column alignments to become out of whack within the diff viewer. It also drew attention to the parts of the file which were identically changed in both the index and in the working directory, yet these are usually the parts I find myself caring the least about. So its very counter-intuitive. Lines which are changed differently by both the index and the working directory are now shown with background colors which span the entire line, making these lines easier to pick out of the diff. In general these are the lines that appear to be more interesting to me when looking at the 3-way diff as they are the ones which contain recent and quite different changes. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Correct toggling of added/untracked status for new files.Shawn O. Pearce1-2/+5
New files also lack index data from diff-files therefore we cannot use their diff-files index data when we update-index. Instead we can use the fact that Git has them hardcoded as "0 0{40}" and do the same thing ourselves. This way you can toggle an untracked file into added status and back out to untracked. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Describe deleted symlinks in a more friendly way.Shawn O. Pearce1-0/+3
Currently core-git's diff utilities report a deleted symlink as a deleted file with a mode of 120000. This is not nearly as user friendly as one might like, as the user must remember that 120000 is the UNIX mode bits for a symlink. So instead we transform the not-so-friendly message from core-git into a slightly more user friendly "deleted symlink" message. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Fix list loading corruption introduced by 1461c5f3.Shawn O. Pearce1-6/+8
Tcl let me assign two different types of values to the variable $n. Prior to 1461c5f3 $n was the total number of bytes in the string; but in that commit it also became the current info list for the current file. This caused $c < $n to fail as $n was now treated as 0 and we only loaded the first file in each buffer. So use a different variable, like $i, instead. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Correct toggling of deleted file status.Shawn O. Pearce1-1/+4
There was a bug with the way we handled deleted file status. A file really shouldn't be in D_ state when it has been deleted, instead it is really DD. Therefore we should have toggled _D to DD, not D_, thereby letting us toggle back to _D. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Make consecutive icon clicks toggle included status of a file.Shawn O. Pearce1-5/+18
If the user clicks on the icon associated with a file we now flip to the inverse status. Partially included files first fully include, then fully uninclude, as we don't keep track of intermediate partial inclusions. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-19git-gui: Teach the gui how to uninclude a file.Shawn O. Pearce1-28/+157
Sometimes the user may want to keep their working directory file to be the same content but they don't want it to be part of the current commit anymore. In this case we need to undo any changes made to the index for that file (by reloading the info from HEAD or removing the file from the index) but leave the working directory alone. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Don't create PkgInfo on Mac OS X "desktop icons".Shawn O. Pearce1-4/+0
Turns out that we really don't need the Contents/PkgInfo file on Mac OS 10.4. The Finder will still launch the application properly without one. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Allow adding untracked files in selection.Shawn O. Pearce1-3/+18
The previous implementation of do_include_selection did not actually add files in state _O (untracked, not added) into the repository when they were in the selection and Commit->Include Selected Files was used. This was due to the file state filtering logic being the same as that of Commit->Include All Files, which only considers existing files. Also fixed a minor issue with rejected attempts to amend an initial commit. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Rephrase rescan before commit informational message.Shawn O. Pearce1-5/+5
Its not an error that a rescan is required before commit; its just something we do as a safety feature to try and ensure the user knows what is going into this commit. So the dialog should use the info icon (if one is used by the host OS) rather than the error icon. Its also not "highly likely" that another Git program modified the repository, its completely the case. There is no reason why the repository would not match our last scanned state unless another Git program modified the repository (or someone else did so by hand). So don't be vague about it, own up to the issue and go on with our business. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Verify the user has GIT_COMMITTER_IDENT before comitting.Shawn O. Pearce1-15/+25
Since git-commit also checks that the user has a GIT_COMMITTER_IDENT value before it lets the user make a commit we should do the same check here in git-gui. We cache the result and assume that the user won't do something which would change the status of GIT_COMMITTER_IDENT while we are running. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Toggle between new commit and amend commit modes.Shawn O. Pearce1-18/+79
I was starting to find it annoying that once you entered the 'Amend Last' mode there was no way to go back to the 'New Commit' mode without quitting and restarting git-gui. Its just confusing for the end-user. Now we can flip back and forth between a new commit and an amend commit through a pair of radio buttons on the header of the commit buffer area and through a pair of radio menu buttons in the Commit menu. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Start UI with the index locked.Shawn O. Pearce1-1/+2
Because we immediately start a rescan operation, but do so slightly delayed (by 1 ms, to let the UI show before we start forking off git processes), we can't let the user try to activate any of the restricted GUI commands before the 1 ms timer expires and we kick off the rescan. So now we lock the index before we enter the Tk event loop, ensuring that it is impossible for the user to inject a conflicting UI event before our rescan can begin. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Misc. comment formatting cleanups.Shawn O. Pearce1-11/+19
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Add menu option to include only selected files.Shawn O. Pearce1-3/+29
When the user selects a number of files they would typically expect to be able to act on that selection, such as by including those files into the next commit. So we now have a menu option under the Commit menu that lets the user include only the selection, rather than everything. If there is no selection but there is a file in the diff viewer than we consider that to be the selection (a selection of 1). Unfortunately we don't disable this option yet when there's nothing selected to include, but this is probably not a big deal as there are very few situations where there are no selected files. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Refactor file state representations.Shawn O. Pearce1-10/+10
It just felt wrong to me that I was using _ as part of the mode argument to display_file to mean "don't care/use existing" and * as part of the mode argument to mean "force to _". So instead use ? to mean "don't care/use existing" and _ to mean "force to _". The code is a lot clearer this way and hopefully it won't drive another developer insane, as it did me. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Only reshow diff when really necessary.Shawn O. Pearce1-17/+21
I noticed that we were reshowing the current diff during a commit; this occurs because we feed every added and modified file through update-index just before commit. During the update-index process we reshow the current diff if the current file in the diff pane was one of those added or modified files we reprocessed. This just slows down the UI more than is necessary. So refactoring update_index so that we don't call reshow_diff from within that code; instead we do it at a higher level. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Make initial commits work properly.Shawn O. Pearce1-28/+46
Apparently I never really tested the logic for making or amending an initial commit, so although most of the code was here in git-gui it didn't quite work as it was intended to. So this is all just bug fixes to make initial commits correctly generate the list of files going into the initial commit, or to show a newly added file's diff, and to amend an initial commit. Because we really want to diff the index against a tree-ish and there is no such tree-ish on an initial commit we create an empty tree through git-mktree and diff against that. This unfortunately creates a dangling tree, which may confuse a new user who uses git-gui to make a new commit and then immediately afterwards runs git fsck-objects to see if their object database is corrupt or not. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Display error dialog on Mac OS X when no .git found.Shawn O. Pearce1-3/+6
If we can't locate a .git directory for the given directory we need to show a message to the user to let them know the directory wasn't found. But since this is before we have shown our main application window we cannot use that as the parent for the error popup; on Mac OS X this causes an error and prevents the dialog from showing. Instead only add -parent . to the popup call if we have mapped (shown) the main window. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-18git-gui: Create a .app file on MacOS X if requested.Shawn O. Pearce1-0/+78
If a user works with a repository frequently they may want to just create an icon they can use to launch git-gui against that repository. Since we already support this concept on Windows we can do the same on Mac OS X by creating a .app file with a tiny shell script in it that sets up the necessary environment then invokes our script. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-17git-gui: Only populate a fetch or push if we have an action.Shawn O. Pearce1-8/+60
Don't offer to fetch from a remote unless we have at least one Pull: line in its .git/remotes/<name> file or at least one configuration value for remote.<name>.fetch. Ditto for push. Users shouldn't be fetching or pushing branch groups unless they have them configured; anything else is just crazy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-17git-gui: Handle ' within paths when creating Windows shortcuts.Shawn O. Pearce1-0/+2
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-17git-gui: Protect ourselves from funny GIT_DIR/working directory setups.Shawn O. Pearce1-2/+12
Since we have some serious problems with the GIT_DIR environment variable on Windows we cannot let the user use a non-standard GIT_DIR with their working directory. So require that the GIT_DIR name is actually ".git", that it exists, and that its parent directory is our working directory. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-17git-gui: Create Windows shortcut icons for git-gui.Shawn O. Pearce1-0/+55
If we are running on Windows we now offer a 'Create Desktop Icon' menu item under the Project menu. This pops up a save dialog box letting the user create a .bat file on their desktop (or somewhere else). The .bat script will startup Cygwin with a login shell then launch git-gui in the current working directory. This is very useful for Windows users who have little to no desire to start a command window just to run a git-gui session. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-17git-gui: Correctly handle GIT_DIR environment variable.Shawn O. Pearce1-5/+6
Some users may want to start us by running "git --git-dir=... gui" rather than trying to cd into the directory first. This is especially true if they want to just make a shortcut to our executable on Windows and always have that associated with a certain repository. Since Tcl on Windows throws away our environment and doesn't pass it down to the child process correctly we cannot call git-rev-parse to get the GIT_DIR environment variable. So instead we ask for it specifically ourselves; if its not defined then we ask rev-parse. This should actually reduce startup by 1 fork/exec if we were started as "git gui" as GIT_DIR will be set for us. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-15git-gui: Disable diff actions when no diff is active.Shawn O. Pearce1-68/+118
There is no reason why the user should be able to operate on the diff buffer if there is no currently selected diff; likewise the "File:" label text appears rather silly looking all by itself when no diff is being shown in the diff buffer. So now we only enable widgets (like menu items) if there is a diff currently showing, and we disable them when a diff isn't showing. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-15git-gui: Automatically update-index all included files before commit.Shawn O. Pearce1-35/+66
If the user has "Allow Partially Included Files" disabled (and most probably will as its the default setting) we should run update-index on every included file before commit to make sure that any changes made by the user since the last rescan will still be part of this commit. If we don't update-index every modified file the user will likely become confused when part of their changes were committed and other parts weren't; and those other parts won't show up until a later rescan occurs. Since we don't rescan immediately after a commit this may be a while. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-14git-gui: Allow update_index to also run a script when it completes.Shawn O. Pearce1-11/+20
Like rescan we also have cases where we need to perform a script after we have finished updating a number of files in the index. By changing the parameter structure of update_index we can easily pass through any script we need to run afterwards, such as picking up in the middle of a commit, or finishing what is left of a rescan. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-14git-gui: Provide an after-rescan script to rescan.Shawn O. Pearce1-34/+34
There are some situations where we need to run rescan and have it do more than just updating the status in the UI when its complete. To help with that this changes the rescan procedure to take a script which it will run at the global level as soon as the rescan is done and the UI has finished updating with the results. This is useful for example if we performed a rescan as part of a commit operation; we can go back to the commit where we left off when the rescan got initiated. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-14git-gui: Refactor update_status -> rescan.Shawn O. Pearce1-11/+11
Since we refer to the act of updating our memory structures with index and working directory differences as a rescan in the UI its probably a good idea to make the related procedures have the same name. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Implemented multiple selection in file lists.Shawn O. Pearce1-25/+111
Because I want to let users apply actions to more than one file at a time we really needed a concept of "the current selection" from the two file lists. Since I'm abusing a Tk text widget for the file displays I can't really use the Tk selection to track which files are picked and which aren't. So instead we keep this in an array to tell us which paths are currently selected and we use an inverse fg/bg for the selected file display. This is common most operating systems as a selection indicator. The selection works like most users would expect; single click will clear the selection and pick only that file, M1-click (aka Ctrl-click or Cmd-click) will toggle the one file in/out of the selection, and Shift-click will select the range between the last clicked file and the currently clicked file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Narrow the no differences information message.Shawn O. Pearce1-7/+9
On Mac OS X the no differences informational message was linewrapped at the wrong points due to the limited width of the system dialog, yet the LFs embedded in the message (where I linewrapped it manually) were also being honored. This resulted in a very difficult to read paragraph of text. So this narrows the text down by another 10 columns or so, making it more readable. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Refactor mouse clicking on file names/icons.Shawn O. Pearce1-9/+6
I'm not a huge fan of putting the left and right mouse actions into the same procedure. Originally this is how Paul had implemented the logic in gitool and I had carried some of that over into git-gui, but now that I'm getting ready to implement right mouse click features to act on files I really should split this apart. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: By default don't allow partially included files.Shawn O. Pearce1-11/+25
The concept of the Git index is confusing for many users, especially those who are newer to Git. Since git-gui is (at least partially) intended to be used by newer users who don't need the complexity of the index to be put in front of them early on, we should hide it by making any partially included file fully included as soon as we identify it. To do this we just run a quick update_index pass on any file which differs both in the index and the working directory, as these files have already been at least partially included by the user. A new option has been added in the options dialog (gui.partialinclude) which lets the user enable accessing the index from git-gui. This just disables the automatic update_index pass on partially included files. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Reverted file name text field to a label.Shawn O. Pearce1-22/+12
So although a text field with a flat relief looks like a label on Windows it doesn't on Mac OS X. The Aqua version of Tk is still drawing a border around the text field and that makes the diff pane header look pretty ugly. Earlier I had made the file name area into a text widget so the user could highlight parts of it and copy them onto the clipboard; but with the context menu being present this isn't quite as necessary as the user can copy the file name to the clipboard using that instead. So although this is a small loss in functionality for non-Mac OS X systems I think it is still reasonable. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Minor UI layout improvements for console windows.Shawn O. Pearce1-7/+5
Moved the Close button over to the lower right corner where our Cancel/Save buttons are in the options dialog. This should fit better with our own look and feel as well as that of most apps on Mac OS X and Windows. Also set the lower status bar in a console window to indicate the process is working and that the user should wait for it to finish. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Display status on left in diff header.Shawn O. Pearce1-12/+10
Because the Tk pack layout manager gives all space to the right/bottom most widget during expand/contract of the frame we were adding and removing all space from the status area of the bar and not from the file name, which is what we actually wanted. A simple enough fix is to just put the status of the given file on the left side of the diff viewer header rather than on the right. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Correct language for M_/A_ status codes.Shawn O. Pearce1-4/+4
When I changed from 'check in' to 'include' I missed the human friendly status displayed in the right side of the diff viewer heading. It was still reporting 'Checked in' for a fully included file, which is not what we wanted it to say. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Allow the user to copy name of the file in the diff viewer.Shawn O. Pearce1-4/+26
There's a lot of reasons why the user might need to obtain the complete (or just part of) path of a file which they are currently viewing in the diff viewer pane. So now we allow selection on this widget by using a text widget instead of a label. We also offer a context menu which has actions for copying the selection or the entire value onto the clipboard. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Use a smaller pipe buffer for update-index.Shawn O. Pearce1-1/+5
When we shove a large number of files at update-index and they have very short path names we are likely going to fit a large number of them into the pipe buffer very early; thereby seeing a huge progress update followed by lots of waiting between progress updates due to the latency of update-index. Using a smaller buffer should help smooth out the progress updates as we are better able to keep tabs on the update-index process' progress through our list of paths. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Sort the list of paths being updated in the index.Shawn O. Pearce1-0/+1
Its a little surprising to see the UI update the icons for files in random order, due to the fact that the files are updating in the order they appear within the array (which is based on a hash function and not order). So sort the list of files before we send any to update-index so the order of operation is means something to the user. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Allow the user to control the number of context lines in a diff.Shawn O. Pearce1-11/+55
When displaying a diff the Git default of 3 line of context may not be enough for a user to see what has actually changed. Consequently we set our own program default to 5 lines of context and then allow the user to adjust this on a per-repository and global level through our options dialog. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Cleanup diff construction code to prepare for more options.Shawn O. Pearce1-4/+11
I'd like to allow the user to have more control over how we format the diff in the diff viewer; to that end we need to add additional options to the diff-index command line as we construct the command for execution. So cleanup the command handling code now to use lappend so we can come back and add in our additional options. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Reshow diff if we sent the file to update-index.Shawn O. Pearce1-4/+9
We can't ask the diff viewer to recompute the diff until after our update-index child process terminates, as the diff programs need to be able to read the updated index in order to generate the correct diff. This is actually why we prevent diffs from being generated while there is an update lock on the index, which is why we ignored our own show_diff invocation in the middle of the write_update_index event handler. So now we mark a flag if we identify that the file currently in the diff viewer was also sent to update-index; then later when the update-index process has terminated we update the diff viewer if the flag is true. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Always use eq/ne for string comparsions.Shawn O. Pearce1-70/+70
This is one of those stupid Tcl mistakes that an experienced Tcl programmer just wouldn't make. We should always use eq and ne to compare string values (and never == or !=) as when we use ==/!= Tcl will attempt to convert either side to numeric if one of the two sides looks like a numeric. This could cause some trouble if a file named "1" exists and a different file named "1.0" also exists; their paths are equal according to == but not according to eq. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Added post-commit invocation after the commit is done.Shawn O. Pearce1-1/+16
Since git-commit.sh invokes hooks/post-commit after running git rerere we should do the same if its available and executable. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Remove the commit_active global variable.Shawn O. Pearce1-18/+9
We were originally trying to use $commit_active to tell us if there was a commit currently in progress, just so we didn't attempt to start a second (parallel) one by mistake. But really the index lock handles this for us as it won't let us lock the index if it is already locked for update. So this can't happen. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Run the pre-commit hook in the background.Shawn O. Pearce1-12/+43
I started to notice on Windows that commits took a lot longer to get going than on my Mac OS X system. The real reason is the repositories that I'm testing with on Windows all enabled the standard pre-commit hook while my test repository on Mac OS X doesn't have it executable (so its not running). So the Windows repositories are spending this lag time running that hook. Now we run the pre-commit hook in the background, allowing the UI to update and tell the user we are busy doing things. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Allow the user to disable diff stat summary during pull.Shawn O. Pearce1-2/+6
Because the pull diffstat summary can take as long as the pull itself some users may just choose to disable the summary and save themselves an extra few seconds during each pull. This is especially true if the user really doesn't care about the other files being modified, as due to their project organizational structure they aren't really responsible for their content. This adds an option to the options panel which lets the user disable the diffstat summary (and thus we pass --no-summary to git-pull) but there does appear to be a bug in the config saving code where we did not set the local repo config differently from the global config. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Don't load the global options unless necessary.Shawn O. Pearce1-13/+16
Since git-repo-config will supply us a union of both the global and the local repository configuration data when we invoke it during startup there is no reason to go get the global configuration with an extra call to repo-config unless the user is trying to view & edit all options in the options dialog. Since skipping this extra repo-config invocation save us a little bit of time its nice to be able to avoid it when we are invoked as git-citool and won't be running very long. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Hide non-commit related commands when invoked as git-citool.Shawn O. Pearce1-17/+25
If the user is invoking us as git-citool then they want to perform a single commit and exit quickly. Since we are about to be a very short lived process we should do what we can to avoid spending CPU time setting up menus which the user will never use, like the fetch/push/pull menus. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Correct bugs in font config handling.Shawn O. Pearce1-4/+6
Apparently Tcl is being helpful on Windows during exec and is throwing a \ in front of every { it finds in the string. I'm guessing they think the value might be read by another Tcl program? Anyway, Git faithfully stores the \{ sequence and sends it back that way to Tcl, at which point Tcl parses the list wrong and starts to break it in the middle of any element which contains spaces. Therefore a list such as: -family {Times New Roman} gets broken up into the pairs: {-family \{Times} {New Roman} which is very incorrect. So now we replace all { and } with "", at which point Tcl doesn't throw \ in front of the " on the way out to Git yet it reads it correctly as a list on the way back in. I also found and fixed a bug in the way we restored the fonts when the user presses Restore Defaults in the options dialog. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-13git-gui: Use 'after 1' to post UI rather than tkwait.Shawn O. Pearce1-2/+1
The tkwait visibility command and Windows doesn't seem to realize the window is visible, consequently we are never finishing our initialization by calling update_status. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Added Options... menu item to end of diff context menu.Shawn O. Pearce1-1/+4
Since the font name can only be chosen from within the options dialog giving the user fast access to this dialog from within a context menu that already talks about increasing and decreasing the font size may help users to locate the font name setting as well. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Minor options dialog UI cleanups.Shawn O. Pearce1-4/+6
Display the name of "this" repository rather than the quite ambiguous string "This". The idea is that seeing the name of the directory the repository is stored in should help jog the user's memory about what they are setting options for. Also place the options dialog immediately over the git-gui main window when it gets opened. This way the user isn't scrolling very far away to gain access to the window. At least on my Mac OS X system not doing this makes the options dialog open rather far away, thus requiring lots of mouse activity to reach it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Supply progress feedback when running update-index.Shawn O. Pearce1-64/+79
The git-update-index process can take a while to process a large number of files; for example my laptop would probably need almost an hour to chug through 20,000 modified files. In these incredibly large cases the user should be given at least some feedback to let them know the application is still working on their behalf, even if it won't them do anything else (as the index is locked). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Allow the user to manipulate the fonts from the options panel.Shawn O. Pearce1-16/+124
This turned out to take a lot more time than I thought it would take; but now users can edit the main UI font and the diff/fixed with font by changing both the family name and/or the point size of the text. We save the complete Tk font specification to the user's ~/.gitconfig file upon saving options. This is probably more verbose than it needs to be as there are many useless options recorded (e.g. -overstrike 0) that a user won't really want to use in this application. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Refactor options menu into an options dialog.Shawn O. Pearce1-46/+158
I decided that the options menu was going to turn into a mess after a while as I start to add additional features to git-gui. The better approach would be to create a dialog that lets the user edit the options, including their --global options. We also wisely let the user press Cancel (or destroy the window) to abort any sort of option editing session, without the options being changed. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Use arrow cursor rather than left_ptr.Shawn O. Pearce1-1/+1
Arrow is available on all Tk platforms and is mapped to the native system cursor on Windows and Mac OS X. Consequently its the better cursor choice as it should match whatever the system has configured for the standard pointing thingy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Rename quitting global to is_quitting.Shawn O. Pearce1-4/+4
This is a boolean value; naming it as such is a good thing. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Improve right click context menu binding on all platforms.Shawn O. Pearce1-8/+29
Apparently <Button-3> doesn't work on my single button PowerBook mouse under Mac OS X. I'm guessing this is because Tk is stealing every event and doesn't realize that Control-Button-1 is actually supposed to invoke the context menu on this platform. So now we have a utility procedure is_MacOSX to guess if we are running on a Mac OS X system, and if so setup Control-Button-1 to also activate what Button-3 should have. This does mean that I need to stay away from using Control-Button-1 as a binding in any other context. Of course we should use $M1B for that, which is M1 (aka Command) on Mac OS X so that shouldn't prove to be a problem. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Make use of the Tk font system rather than faking it.Shawn O. Pearce1-100/+92
The native Tk font system is actually quite powerful and has the nice property that modifications to a named font are immediately reflected throughout all widgets currently displayed. This really saves us from needing to write all of the reconfigure code as part of our font display. I also fixed the way we detect and apply the system font on the main UI widgets as although it worked on a Windows 2000 system it does not work at all on my Mac OS 10.4 system. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Refresh a file if it has an empty diff.Shawn O. Pearce1-4/+72
When the user has enabled the Trust File Modification Timestamp option then we may display a file as being modified yet that file may not have a difference. When the user clicks on that file we wind up displaying an empty diff viewer, which makes no sense to the user. So instead if we get an empty diff and the user has this option enabled and the file's current state is _M (no change in index but the working file appears modified) then run a quick update-index on just that file and remove it from the list of modified files. We also give the user a quick dialog stating we are removing it, and why. Usually I don't run into this situation when I have the Trust File Modification Timestamp option enabled, so its not that annoying to have a dialog pop open to remind me why there are no differences. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Allow the user to change the diff viewer font size.Shawn O. Pearce1-1/+27
Because the diff area is one of the most important areas to be able to read users should be able to increase or decrease the size of the font used within that area. Currently we save that back to the global configuration, even if it may have originated from the local repository configuration. This is probably going to be considered to be a bug by at least one user who wants some sort of different font within a given repository, but I'm just going to ignore the problem for now. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Honor system font and let user configure fonts.Shawn O. Pearce1-4/+10
Rather than hardcoding our fonts to something that I thought was reasonable, guess font_ui off the font used by the system in the menu bar. This way the application conforms by default to whatever the user's desktop is setup to. We also now let the user supply font configuration through their repository configuration as gui.fontui (the overall UI font) and gui.fontdiff (the font used for the diff viewer). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Corrected font used for options menu items.Shawn O. Pearce1-0/+1
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Teach sign off to be more intelligent.Shawn O. Pearce1-3/+8
When we sign off on a commit we want to add a blank line between whatever is in the commit buffer and the new Signed-off-by line, unless there already is a Signed-off-by (or Acked-by) tag at the end of the buffer already. This change makes us do the right thing more often. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Fix mouse cursor behavior when in widgets.Shawn O. Pearce1-6/+4
The mouse cursor (at least on Windows) seemed to be picking up the cursor from the sash controls and then never resetting itself back to the standard text cursor (the I-beam) when it was over a text area that the user can edit (like the commit buffer) or over a text area the user can copy from (like the diff viewer). So now we always set the cursor to left_ptr (which according to the Tk documentation should be available everywhere) and only for the two text areas which we use to list file names, as the user clicks in these but is not permitted to select text. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Added context menus for consoles and commit message buffer.Shawn O. Pearce1-0/+66
This change adds a context menu to the commit message buffer providing fast access to the contents of the Edit menu, and to the console text buffer, providing easy ways to copy selections of the buffer or the entire buffer. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Misc. bug fixes for mouse click crashes.Shawn O. Pearce1-3/+10
Make sure the file_lists array has both elements set at all times, otherwise we get Tcl errors during mouse clicks in the file list areas due to the list not being defined. Also added M1-A as a keyboard binding within the console window text area. This lets users select all text easily and copy it to the clipboard. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Misc. formatting cleanups.Shawn O. Pearce1-11/+16
A number of lines were line wrapping in a rather ugly way when opened in vim with line numbers enabled, so I split most of these lines over two lines using a sensible wrapping policy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Simplified format of geometry configuration.Shawn O. Pearce1-10/+19
The gui.geometry config value was starting to contain the odd string \\{ as part of its value due to the way the Tcl lists were being supplied to git repo-config. Now we write out only three values: the overall window geomtry, the y position of the horizontal sash, and the x position of the vertical sash. All other data is skipped, which makes the gui.geometry value simpler. While debugging this I noticed that the save_my_config procedure was being invoked multiple times during exit due to do_quit getting invoked over and over again. So now we set a flag in do_quit and don't perform any of our "at exit" type of logic if we've already been through the do_quit procedure once. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Cleaned up error message formatting.Shawn O. Pearce1-20/+16
Added an extra blank line between the first line of each error message and the rest of the message, as usually the rest of the message is coming from Tcl or is the stderr output of a git command we tried to invoke. This makes it easier to read the output (if any). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Use native tk_messageBox for errors.Shawn O. Pearce1-31/+25
Rather than drawing our own toplevel for error messages we really should just use the the native tk_messageBox command to display any error messages. Major benefits for doing so are: - automatically centers over main window; - less code required on our part in git-gui; - includes a nifty error icon on most systems; - better fits the look-and-feel of the operating system. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Rename difffont/mainfont variables.Shawn O. Pearce1-55/+55
I found difffont to be a very awkward varible name, due to the use of three f's in a row. So use easier to read variable names. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Use catch rather than array names to check file.Shawn O. Pearce1-4/+4
When we reshow the current diff file it can be faster to just fetch the value from the file_states array than it is to ask for all paths whose name exactly matches the one we want to show. This is because [array names -exact] is O(n) in the number of files. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Efficiently update the UI after committing.Shawn O. Pearce1-29/+56
When we commit we know that whatever was in the index went as part of the commit. Since we generally assume that the user does not update the index except through our user interface we can be reasonably certain that any file which was marked as A/M/D in the index will have had that A/M/D state changed to an _ (not different) by the commit. We can use this knowledge to update the user interface post commit by simply updating the index part of the file state of all files whose index state was A/M/D to _ and then removing any file memory any which wound up with a final state of __ (not different anywhere). Finally we redraw the file lists and update the diff view. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Correctly handle files containing LF in their name.Shawn O. Pearce1-8/+13
If we are given a file whose path name contains an LF (\n) we now escape it by inserting the common escape string \n instead of the LF character whenever we display the name in the UI. This way the text fields don't start to span multiple lines just to display one file, and it keeps the line numbers correct within the file lists. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Always indicate the file in the diff viewer.Shawn O. Pearce1-36/+36
When we did a rescan to update the file lists we lost the tag which indicated which file was currently in the diff viewer. This occurs because we delete every line from the two file list boxes (thus removing the tag) and then redisplay the diff in the diff viewer but then fail to restore the tag in the file list. Now we restore that tag by searching for the file in the file lists and adding the tag back when the diff viewer displays something. We also no longer obtain the file path directly from the file list text box. Instead we now keep two Tcl lists, one for each file list, holding the file names in sorted order. These lists can be searched with the native [lsearch -sorted] operation (which should be faster than our crude bsearch) or can be quickly accessed by index to return the file path. This should help make things safer should we ever be given a file name which contains an LF within it (as that would span two lines in the file list, not one). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Clear undo/redo stack when loading a message file from disk.Shawn O. Pearce1-6/+11
If we load a message file (e.g. MERGE_MSG) or we have just finished making a commit and are clearing out the commit buffer we should also clear out the undo/redo stack associated with that buffer. The prior undo/redo stack has no associated with the new content and therefore is not useful to the user. Also modified the sign-off operation to perform the entire update in a single undo/redo operation, allowing the user to undo the signoff in case they didn't actually want to do that. I also noticed what may be a crash on Windows related to the up and down arrow keys navigating within the diff viewer. Since I got back no stack trace (just an application exit with a loss of the commit message) I suspect that the binding to scroll the text widget crashed with an error and the wish process just terminated. So now we catch (and ignore) any sort of error related to the arrow keys in the diff viewer. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Created edit menu and basic editing bindings.Shawn O. Pearce1-1/+60
Users have come to expect basic editing features within their applications, such as cut/copy/paste/undo/redo/select-all. I found these features to be lacking in git-gui so now we have them. I also added basic keyboard bindings for the diff viewing area so that the arrow keys move around single units (lines or columns) and the M1-X/C keys will copy the selected text and the M1-A key will select the entire diff. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-12git-gui: Change accelerator for "Include All" to M1-I.Shawn O. Pearce1-3/+6
Now that we call the update-index all files action "Include All" it makes more sense to make this M1-I (so Control-I or Command-I depending on platform) than M1-U, which stood for update but is somewhat confusing to users. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-08git-gui: Save window geometry to .git/config during exit.Shawn O. Pearce1-61/+88
I started to find it very annoying that my test application kept opening at the wrong location on my desktop, so now we save the basic window geometry and sash positions into the config file as gui.geometry. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-08git-gui: Cache the GIT_COMMITTER_IDENT value on first sign-off.Shawn O. Pearce1-10/+19
Caching the Signed-Off-By line isn't very important (as its not performance critical). The major improvement here is that we now report an error to the user if we can't obtain their name from git-var. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-08git-gui: Show only the abbreviated SHA1 after committing.Shawn O. Pearce1-1/+1
There's really no great reason to show the entire commit object id within the GUI, especially if the user is unable to copy and paste it into another interface such as gitk or a terminal window. So we'll just show them the first 8 digits and hope that is unique within their repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-08git-gui: Changed term 'check-in' to 'include'.Shawn O. Pearce1-19/+19
At least one user was confused by the term 'check-in'; he thought that clicking that button would commit just that one file, but he wanted to include all modified files into his next commit. Since git doesn't really have a check-in concept this really was poor language to use. Git does have an update-index concept but that is a little too low level to show to the user. So instead we now talk about including files in a commit. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2006-11-07git-gui: Bug fix for bad variable reference in display_file.Shawn O. Pearce1-1/+1
When a file jumps between the file lists due to its state changing we crashed thanks to a stale variable reference within the procedure as we tried to setup the new icon. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>