git-gui PATCH Keep repo_config(gui.recentrepos) and .gitconfig in synch

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

git-gui PATCH Keep repo_config(gui.recentrepos) and .gitconfig in synch

From: Christopher Beelby <hidden>
Date: 2016-06-15 22:48:05

This patch addresses two issues:

1. 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.)

For complete step-by-step instructions on how to cause these situations
in git-gui see my comment on the msysgit project at
http://code.google.com/p/msysgit/issues/detail?id=362&colspec=ID%20Type%20Status%20Priority%20Component%20Owner%20Summary#c9

2. 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.

Re: git-gui PATCH Keep repo_config(gui.recentrepos) and .gitconfig in synch

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:48:05

Christopher Beelby [off-list ref] wrote:
This patch addresses two issues:
Thanks, applied.  In the future please follow the SubmittingPatches
guidelines, which includes sending the patch inline in your message
using the formatting created by `git format-patch`.
 
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help