Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Specifying File Scope in the History view
Specifying File Scope in the History view [message #1861534] Tue, 17 October 2023 18:27 Go to next message
Ray Martin is currently offline Ray MartinFriend
Messages: 22
Registered: May 2023
Junior Member
As shown in the figures, I normally activate "Link with Editor and Selection" so the History view tracks the repo selected in the Git Repositories View. The only reason I can think of for not doing this is if you want to simply view a file in a different repo without updating the History view. Is there another reason?

Selecting a commit in the Commit Graph in Fig A shows all files changed by that commit in the File Changed List (only 1 in this example). Right-clicking one of those files then selecting "Focus On This File" updates the Commit Graph to only show commits that changed that file (a07a and d436) as shown in Fig B (Thomas Wolf answer to different post - message #1859582).

In Fig B, "Focus On This File" automatically enables the "Change the File Scope for the History" button in the toolbar. Is there another way to enable that button? Why are these tied together? I haven't found another way to enable the File Scope drop down button except by first doing a "Focus On This File".

Not sure what the items in the File Scope drop down button in Fig B do. Please provide a simple description/example for each of the 4 choices:

  1. All Changes in Repository (".git" directory of the selected repo in the Git Repositories view?)
  2. All Changes in Project ("Working Tree" directory of the selected repo in the Git Repositories view?)
  3. All Changes in Parent Folder (parent folder of the selected file?)
  4. All Changes of Resource (what is a resource and how is it different from a file or folder?)

EGit 6.5.0.202303070854-r

index.php/fa/43591/0/
Re: Specifying File Scope in the History view [message #1861535 is a reply to message #1861534] Tue, 17 October 2023 19:37 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
These choices refer to Eclipse Projects, Folders, and Resources. Please see the Eclipse built-in Help about those terms.

The button is enabled when an Eclipse Project, Folder, or Resource is selected. Also when a file in the working tree in the git repositories view is selected that maps to an Eclipse Project, Folder, or Resource. Apparently the file list in the history view does not check whether a selected file corresponds to an Eclipse Resource.
Re: Specifying File Scope in the History view [message #1861720 is a reply to message #1861535] Mon, 30 October 2023 18:26 Go to previous message
Ray Martin is currently offline Ray MartinFriend
Messages: 22
Registered: May 2023
Junior Member
You're right, this applies to the Eclipse project. Is this why the "All changes in Project" item is always disabled (Fig C)?

Their definition of Resource is "... a collective term for the folders, and files in that project". Based on my tests, it seems anything in the Working Tree not inside the .git folder is treated as a Resource. If the File Scope drop down button is enabled, it means you selected a qualifying resource.

Clicking a resource immediately updates the Commit Graph which is a quick way to view all commits that include that resource. After selecting one of these commits, the file list highlights "in-scope" files in black text and all other files in that commit in gray text as shown in bottom right of Fig D. This is an insightful tool but takes a while to appreciate.

index.php/fa/43652/0/
Previous Topic:Git worktree support in egit
Next Topic:multiple ssh keys
Goto Forum:
  


Current Time: Sun May 05 14:40:54 GMT 2024

Powered by FUDForum. Page generated in 0.03168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top