summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorLibravatar Christopher Beelby <chris@celabs.com>2010-01-23 14:37:17 -0800
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2010-01-23 14:46:12 -0800
commit3c6a2870274ea629499dfb6a925548caf55ee105 (patch)
tree470bf5d79bbca6da712c6aae1f19506bf454faed /git-gui.sh
parentgit-gui: handle really long error messages in updateindex. (diff)
downloadtgif-3c6a2870274ea629499dfb6a925548caf55ee105.tar.xz
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>
Diffstat (limited to 'git-gui.sh')
0 files changed, 0 insertions, 0 deletions