Find a file
Christopher Beelby 3c6a287027 git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
When the number of recent repo's gets to ten there can be a
situation where an item is removed from the .gitconfig file via
a call to git config --unset, but the internal representation of
that file (repo_config(gui.recentrepo)) is not updated.  Then a
subsequent attempt to remove an item from the list fails because
git-gui attempts to call --unset on a value that has already
been removed.  This leads to duplicates in the .gitconfig file,
which then also cause errors if the git-gui tries to --unset them
(rather than using --unset-all. --unset-all is not used because it
is not expected that duplicates should ever be allowed to exist.)

When loading the list of recent repositories (proc _get_recentrepos)
if a repo in the list is not considered a valid git reposoitory
then we should go ahead and remove it so it doesn't take up a slot
in the list (since we limit to 10 items). This will prevent a bunch
of invalid entries in the list (which are not shown) from making
valid entries dissapear off the list even when there are less than
ten valid entries.

See: http://code.google.com/p/msysgit/issues/detail?id=362
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23 14:46:12 -08:00
lib git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync 2010-01-23 14:46:12 -08:00
macosx git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk 2008-07-25 15:08:33 -07:00
po git-gui: Update russian translation 2009-08-12 08:34:37 -07:00
windows git-gui (Win): make starting via "Git GUI Here" on .git/ possible 2009-04-05 13:06:24 -07:00
.gitattributes git-gui: Use gitattribute "encoding" for file content display 2008-09-24 12:48:31 -07:00
.gitignore git-gui: Honor a config.mak in git-gui's top level 2007-10-13 22:14:14 -04:00
git-gui--askpass git-gui: Add a simple implementation of SSH_ASKPASS. 2008-11-01 16:01:34 -07:00
git-gui.sh git-gui: Add hotkeys for "Unstage from commit" and "Revert changes" 2010-01-06 18:21:11 -08:00
GIT-VERSION-GEN git-gui 0.12 2008-12-17 20:15:17 -08:00
Makefile git-gui: Makefile: consolidate .FORCE-* targets 2010-01-06 18:20:01 -08:00