Skip to content
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

Submodule context menus: Only show if dir exists #8646

Merged

Conversation

gerhardol
Copy link
Member

Fixes #8104

A few other NBug issues exist. I have considered this to be a too much edge case to fix it. Maybe users experience this before they have downloaded submodules? Or this is an indication that there are few serious NBug issues that are not reported.

There has been cleanups for access to submodule dirs in changes the last year, for instance #7690 and #8117, to not access submodules if the directories does not exist.

Proposed changes

Only show context menus for work tree submodules "internals" if the submodule directories exists, required for the Git commands to run.

For FormCommit, the menus are disabled.

For RevDiff the menus the are not shown. The Controller structure (which is made this way to test) adds another layer to handle enable/disable and makes this quite complicated, it is not worth the effort.

Screenshots

Before

image

image

After

image

image

Test methodology

Added a test


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Nov 29, 2020
@codecov
Copy link

codecov bot commented Nov 29, 2020

Codecov Report

Merging #8646 (dadcc6c) into master (2b51726) will decrease coverage by 0.00%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #8646      +/-   ##
==========================================
- Coverage   55.09%   55.09%   -0.01%     
==========================================
  Files         906      906              
  Lines       65562    65581      +19     
  Branches    11874    11875       +1     
==========================================
+ Hits        36124    36134      +10     
- Misses      26602    26612      +10     
+ Partials     2836     2835       -1     
Flag Coverage Δ
production 42.09% <14.28%> (-0.01%) ⬇️
tests 94.92% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@gerhardol gerhardol force-pushed the feature/submodule-directory-exists branch from 8b8f229 to dadcc6c Compare November 30, 2020 23:57
@gerhardol gerhardol added this to the 4.0 milestone Dec 5, 2020
@gerhardol
Copy link
Member Author

@msftbot merge in 48 hours

@ghost ghost added the status: auto merge label Dec 9, 2020
@ghost
Copy link

ghost commented Dec 9, 2020

Hello @gerhardol!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 11 Dec 2020 22:39:17 GMT, which is in 2 days

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@RussKie RussKie merged commit 26736ce into gitextensions:master Dec 11, 2020
@gerhardol gerhardol deleted the feature/submodule-directory-exists branch December 11, 2020 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NBug] The directory name is invalid
3 participants