-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't barf on duplicate recent repo list entries, nor a full list #10
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The git gui's recent repo list may become contaminated with duplicate entries. The git gui would barf when attempting to remove one entry. Remove them all - there is no option within 'git config' to selectively remove one of the entries. This issue was reported on the 'Git User' list (https://groups.google.com/forum/#!topic/git-users/msev4KsQGFc, Warning: gui.recentrepo has multiply values while executing). And also by zosrothko as a Git-for-Windows issue git-for-windows/git#1014. On startup the gui checks that entries in the recentrepo list are still valid repos and deletes thoses that are not. If duplicate entries are present the 'git config --unset' will barf and this prevents the gui from starting. Subsequent patches fix other parts of recentrepo logic used for syncing internal lists with the external .gitconfig. Reported-by: Alexey Astakhov <[email protected]> Signed-off-by: Philip Oakley <[email protected]>
_get_recentrepo will fail if duplicate invalid entries are present in the recentrepo config list. The previous commit fixed the 'git config' limitations in _unset_recentrepo by unsetting all config entries, however this code would fail on the second attempt to unset it. Refactor the code to pre-sort and de-duplicate the recentrepo list to avoid a potential second unset attempt. Signed-off-by: Philip Oakley <[email protected]>
When the gui/user selects a repo for display, that repo is brought to the end of the recentrepo config list. The logic can fail if there are duplicate old entries for the repo (you cannot unset a single config entry when duplicates are present). Similarly, the maxrecentrepo logic could fail if older duplicate entries are present. The first commit of this series ({this}~2) fixed the config unsetting issue. Rather than manipulating a local copy of the $recent list (one cannot know how many entries were removed), simply re-read it. We must also catch the error when the attempt to remove the second copy from the re-read list is performed. Signed-off-by: Philip Oakley <[email protected]>
The gui.recentrepo list may be longer than the maxrecent setting. Allow extra space to show any extra entries. In an ideal world, the git gui would limit the number of entries to the maxrecent setting, however the recentrepo config list may have been extended outwith the gui, or the maxrecent setting changed to a reduced value. Further, when testing the gui's recentrepo logic it is useful to show these extra, but valid, entries. Signed-off-by: Philip Oakley <[email protected]>
Closed
1 task
@PhilipOakley seeing as @patthoyts is probably too busy to have a look at this any time soon, do you think we should go ahead and merge it into Git for Windows to unblock our users? |
Yes. I was also going to comment on the upstream Git list that this hadn't been picked up their either. There is a comment there about some gitk issues as well that haven't been picked up |
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Feb 23, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/build-extra
that referenced
this pull request
Feb 24, 2017
A couple of Git GUI bugs regarding the list of recent repositories [have been fixed](patthoyts/git-gui#10). Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Feb 25, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Mar 1, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Mar 1, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 1, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 2, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 3, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Mar 6, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 8, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 8, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 9, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 11, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 11, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 11, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 12, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 13, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Mar 13, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jun 21, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Jun 25, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to dscho/git
that referenced
this pull request
Jun 26, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Jul 5, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to dscho/git
that referenced
this pull request
Jul 13, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jul 14, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jul 14, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Jul 14, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jul 14, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Jul 21, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jul 25, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jul 25, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Jul 25, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to dscho/git
that referenced
this pull request
Jul 25, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Jul 27, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Jul 31, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 1, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 1, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 2, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 4, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Aug 5, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Aug 8, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to git-for-windows/git
that referenced
this pull request
Aug 10, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 10, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 10, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
git-for-windows-ci
pushed a commit
to git-for-windows/git
that referenced
this pull request
Aug 15, 2017
This resolves a couple of Git GUI issues that seem not to have been picked up from patthoyts/git-gui#10 yet. Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
git-for-windows/git#1014 highlighted this problem which I had addressed at the end of 2015, but got lost over the Christmas.
This resurects and improves my old code, so that no matter how created dulicate entries in the recent repo list do not crash the Git-gui.