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

Safeguard discard #459

Merged
merged 22 commits into from
Oct 2, 2024
Merged

Safeguard discard #459

merged 22 commits into from
Oct 2, 2024

Conversation

isc-hwojnick
Copy link
Contributor

fixes #455

Copy link
Collaborator

@isc-tleavitt isc-tleavitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to apply to the menu-based discard (ClassMethod Revert in SourceControl.Git.Utils) which uses the checkout command rather than restore.

cls/SourceControl/Git/Utils.cls Outdated Show resolved Hide resolved
@isc-pbarton isc-pbarton marked this pull request as draft August 21, 2024 20:58
@isc-pbarton isc-pbarton self-assigned this Aug 21, 2024
@isc-etamarch
Copy link
Collaborator

This also needs to apply to the menu-based discard (ClassMethod Revert in SourceControl.Git.Utils) which uses the checkout command rather than restore.

What do you mean by menu-based discard? Where would you access that in the UI?

@isc-etamarch isc-etamarch marked this pull request as ready for review September 27, 2024 13:19
cls/SourceControl/Git/DiscardState.cls Show resolved Hide resolved
cls/SourceControl/Git/DiscardState.cls Outdated Show resolved Hide resolved
cls/SourceControl/Git/DiscardState.cls Show resolved Hide resolved
cls/SourceControl/Git/DiscardState.cls Show resolved Hide resolved
cls/SourceControl/Git/DiscardState.cls Outdated Show resolved Hide resolved
cls/SourceControl/Git/WebUIDriver.cls Outdated Show resolved Hide resolved
git-webui/src/share/git-webui/webui/js/git-webui.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@isc-tleavitt isc-tleavitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks fine from a code standpoint but want to kick the tires on it before merging. @isc-pbarton could you review too?

git-webui/release/share/git-webui/webui/js/git-webui.js Outdated Show resolved Hide resolved
cls/SourceControl/Git/DiscardState.cls Outdated Show resolved Hide resolved
Replaced HTML characters with escaped versions, made sure discarded files are compiled after import
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 82 lines in your changes missing coverage. Please review.

Project coverage is 25.06%. Comparing base (f3fd329) to head (b8b143c).

Files with missing lines Patch % Lines
cls/SourceControl/Git/DiscardState.cls 0.00% 46 Missing ⚠️
cls/SourceControl/Git/WebUIDriver.cls 0.00% 35 Missing ⚠️
cls/SourceControl/Git/Utils.cls 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
- Coverage   25.90%   25.06%   -0.84%     
==========================================
  Files          17       18       +1     
  Lines        2459     2541      +82     
==========================================
  Hits          637      637              
- Misses       1822     1904      +82     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@isc-etamarch isc-etamarch merged commit 6ad5fe0 into main Oct 2, 2024
2 checks passed
@isc-etamarch isc-etamarch deleted the safeguard-discard branch October 2, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discard changes for a file in namespace but not in local repo should not delete file. Production cls deleted.
5 participants