Skip to content

Sync files with IRIS after performing a 'Hard Reset' or 'Revert' via WebUI #809

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Fix Import All not importing items that do not already exist when compileOnImport is not set (#798)
- Fix Revert not syncing files with IRIS (#789)

## [2.12.2] - 2025-07-08

Expand Down
19 changes: 19 additions & 0 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,25 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
set diffCompare = args(i + 1)
} elseif (args(i) = "commit") {
set isCommit = 1
} elseif (args(i) = "reset") {
// Sync files after performing a 'Hard Reset' via the WebUI
if (args(i + 1) = "--hard") {
set syncIrisWithDiff = 1
set syncIrisWithDiffAfterGit = 1
set syncIrisWithDiffVerbose = 1
// The current commit will still be able to be referenced to diff against
// despite the fact that it will disappear after the reset is performed
set diffBase = ..GetCurrentRevision()
}
} elseif (args(i) = "revert") {
// Sync files after performing a 'Revert' via the WebUI
if (args(i + 1) = "--no-commit") {
set syncIrisWithDiff = 1
set syncIrisWithDiffAfterGit = 1
set syncIrisWithDiffVerbose = 1
// When syncing diff against what is being reverted
set diffBase = args(i + 2)
}
}
}
}
Expand Down
Loading