Community
Participate
Working Groups
It would be nice to search for Git commits in the same way Mylyn tasks are searched for. Currently the History view does offer find capabilities but they don't filter the list to show only the matches and they are limited to finding in only one repository at a time. This would introduce a new tab in the Eclipse Search dialog "Git Commit Search" The search results would display in the standard Search view and commits could be opened in an Eclipse form editor where the files, description, and other information will be displayed.
Please comment with any ideas or feedback you have for this feature.
Instead of using the search dialog, I would prefer a Ctrl+Shift+T (Open Type via the JDT) approach. What type of information do you want to filter by besides SHA-1 and description?
Committer and author would also be filterable/searchable. Open type would be useful for opening by a SHA-1 but I still think commit search is needed for more broad searching and browsing that you wouldn't want to do in a modal context.
People hardly use the Java Search and Plug-in Search mechanisms in Eclipse. Most people opt for Open Type (Ctrl+Shift+T) and Open Artifact (Ctrl+Shift+A) in Eclipse these days. We can provide something similar using the open type dialog imho using the extended dialog area for some more filtering options...
I agree those mechanisms are infrequently used but I commonly use both File search and Task search and I think this feature would satisfy the same goals as those.
(In reply to comment #5) > I agree those mechanisms are infrequently used but I commonly use both File > search and Task search > and I think this feature would satisfy the same goals as those. Well we can start somewhere, I guess it would be fine to have both options. Mylyn has a Open Task similar to Open Type that's not easily found by default.
Created attachment 193397 [details] Commit search dialog and results Adding initial screenshot of commit search proof of concept
Not bad, I'd name it just "Git Search" for simplicity.
Yeah, sounds good, see bug343000 for screenshot of editor that opens when commit is double-clicked from search view.
(In reply to comment #9) > Yeah, sounds good, see bug343000 for screenshot of editor that > opens when commit is double-clicked from search view. Looks nice! I see potential checkout buttons added. I'm not sure if "editor" is the right word... isn't it more of a viewer?
You are right, it definitely is a viewer. Editing is not supported, although I guess if it is the latest commit it could support amending directly.
Created attachment 194663 [details] Open commit filter dialog Attaching screenshot of current open commit dialog that is a filterable dialog similar to open task and open type.
I like where this is going!!! A couple things 1) Have a hyperlink that opens the Git Search dialog, similar to what Mylyn does with it's Alt+F12 task dialog (in case people want to do a more detailed search) 2) In the details area, we should list what repository the commit comes from 3) In my opinion, we should do something like a FilteredRefsSearchDialog that takes parameters to decide to what to display (commits, branches, tags, etc). The goal would be to get rid of AbstractBranchDialog and friends and replace it with this new dialog. 4) We should search by commit sha-1 and message. 5) Similar to the Ctrl+Shift+R (Open Resource) dialog, I could envision giving people options to open the viewer or checkout the ref. That's all I can think of now.
Merged as 2c117553bff2e31b4f1fa4f1048e6670ca11a396. Please open other bugs for enhancement ideas or issues.