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

Force git update of ide-urls #173

Closed
hohwille opened this issue Jan 9, 2024 · 0 comments · Fixed by #155
Closed

Force git update of ide-urls #173

hohwille opened this issue Jan 9, 2024 · 0 comments · Fixed by #155
Assignees
Labels
enhancement New feature or request git

Comments

@hohwille
Copy link
Member

hohwille commented Jan 9, 2024

The repository ide-urls is cloned to $IDE_ROOT/_ide/urls and always updated.
If for some reason the end-user (accidentally) does a modification here, this can make IDEasy end up in strange errors if git pull causes merge conflicts that need manual resolving.

With PR #155 @jan-vcapgemini already introduced a nice feature to support force updating git repos that users shall not interfere with.
In such case, we simply fetch and then reset the git repo reverting any potential local change of the user.
This feature shall only be used for ide-urls as here we are using GIT only as a kind of efficient protocol to distribute changes efficiently from our server (github repo ide-urls) to the client (IDEasy installation). Changes of the user are always considered accidentally and are undesired. Therefore we can force override them.

However, repos like the settings repo must never use this new force update mode as the end-user could lose a lot of valuable work this way. Still we could improve interactive support in case of conflicts (asking the user to stash changes and then continue so after that the user can unstash and manually resolve conflicts with the git tool of his choice). The latter is so far just an idea and not part of this story.

@hohwille hohwille added the enhancement New feature or request label Jan 9, 2024
@hohwille hohwille added this to the release:2024.01.001 milestone Jan 9, 2024
@hohwille hohwille added the git label Jan 9, 2024
@hohwille hohwille linked a pull request Jan 9, 2024 that will close this issue
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Jan 23, 2024
added checks for untracked files to force mode
added checks for changed files to force mode
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Jan 25, 2024
added new GitUtils class
made sure that force only runs in online mode
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Jan 26, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Jan 29, 2024
removed runGitFetch method
added runGitClone method
added exception if git clone was attempted while being offline
removed result from runGitReset
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Jan 29, 2024
added warning to git clone
added remote and target to git pull
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Jan 30, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 2, 2024
replaced isOnline with isOffline (to check offlineMode too)
removed obsolete method
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 2, 2024
added lazy loading of ProcessContext
added new initializeProcessContext method
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 5, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 5, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 5, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 5, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 5, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 5, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 6, 2024
replaced copyForMutation with tempDir
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 9, 2024
renamed isOffline to isOnline
added override of isOnline to GitUtilsTextContext
added new testOnlineMode to GitUtilsTestContext
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 9, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 9, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 13, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 15, 2024
removed gitPullOrClone from IdeContext interface
moved gitPullOrCloneIfNeeded to GitUtils
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 15, 2024
added and implemented new GitContext interface
added getGitContext to IdeContext
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 15, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 15, 2024
removed GitUtilsProcessResultMock
renamed GitUtils to GitContext
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 15, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 16, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 20, 2024
removed remoteName and branchName
added remote and branch name retrieval
added retrieveRemoteAndBranchName method to GitContextImpl
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 20, 2024
removed behind message from branch
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 21, 2024
added new GitUrl record
added new pullOrFetchAndResetIfNeeded (for ide-urls only)
adjusted tests (added HEAD file)
passed GitUrl to clone method
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 21, 2024
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request git
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants