Simple "Assume Unchanged" example raises questions/suggestions [message #1866396] |
Tue, 28 May 2024 14:44 |
Eclipse User |
|
|
|
EGit 6.9.0.2024
There're several "Assume Unchanged" posts (most recent is 2020). Here's why I think this needs "fixing".
The Private-01 repo initially didn't have an Eclipse project so I did a Smart Import. You must then press F5 to update the Working Tree and Unstaged Changes views to show it added a ".project" file as shown in Fig 1. Next, I right-click and select Ignore which adds ".project" to the .gitignore file.
Unstaged Changes now shows .gitignore in Fig 2a. I don't want to include this in a commit so I right-click and select Assume Unchanged which removes .gitignore from Unstaged Changes (Fig 2b).
In Fig 3 I edit Notes.txt and save which adds it to Unstaged Changes then I select Assume Unchanged.
There are now 2 files (.gitignore and Notest.txt) that have been configured "Assume Unchanged". As shown in the left of Fig 4, shouldn't these file icons now indicate "assume-valid"? (see EGit help). Nothing in Fig 4 (Working Tree) or Fig 5 (Clean Repository) indicates Assume Unchanged for these files. Future edits won't cause these files to appear in Unstaged Changes which is correct. They now behave like untracked files but there's no matching pattern in the .gitignore file so what did Assume Unchanged do? Assume Unchanged must be able to handle multiple files so how/where is this setting saved?
Fig 6a shows the project for this repo in the Project Explorer. This view doesn't normally show .gitignore or .project files regardless of Assume Unchanged. It does correctly include Notes.txt but doesn't show the "assume-valid" icon.
To restore tracking of .gitignore, right-click the project folder the select Team->Advanced->No Assume Unchanged as shown in Fig 6a. The .gitignore and Notes.txt files both again appear in Unstaged Changes (Fig 6b).
Rather than doing Team->Advanced->No Assume Unchanged in the Project Explorer (Fig 6a), shouldn't this be done in the Git perspective Working Tree? In other words, do repo stuff in the repo view, not the project view. This applies to many items in the Team menu.
If the .gitignore file icon in the Working Tree indicated "assume-valid", I should be able to right-click it and select "No Assume Unchanged" for just that item.
Sprinkled within these images are notes when you also need to "press F5" or "click view" to manually refresh the GUI. Shouldn't it automatically refresh?
|
|
|
Powered by
FUDForum. Page generated in 0.03520 seconds