Bug 341652 - Add ability to search for Git commits
Summary: Add ability to search for Git commits
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.0.0   Edit
Assignee: Kevin Sawicki CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 343000
Blocks:
  Show dependency tree
 
Reported: 2011-04-01 13:35 EDT by Kevin Sawicki CLA
Modified: 2011-05-12 21:06 EDT (History)
2 users (show)

See Also:


Attachments
Commit search dialog and results (157.78 KB, image/png)
2011-04-15 14:04 EDT, Kevin Sawicki CLA
no flags Details
Open commit filter dialog (34.87 KB, image/png)
2011-05-03 22:38 EDT, Kevin Sawicki CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Sawicki CLA 2011-04-01 13:35:41 EDT
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.
Comment 1 Kevin Sawicki CLA 2011-04-01 13:46:18 EDT
Please comment with any ideas or feedback you have for this feature.
Comment 2 Chris Aniszczyk CLA 2011-04-04 12:40:35 EDT
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?
Comment 3 Kevin Sawicki CLA 2011-04-04 12:53:27 EDT
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.
Comment 4 Chris Aniszczyk CLA 2011-04-04 13:07:21 EDT
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...
Comment 5 Kevin Sawicki CLA 2011-04-04 13:13:37 EDT
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.
Comment 6 Chris Aniszczyk CLA 2011-04-04 13:17:02 EDT
(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.
Comment 7 Kevin Sawicki CLA 2011-04-15 14:04:29 EDT
Created attachment 193397 [details]
Commit search dialog and results

Adding initial screenshot of commit search proof of concept
Comment 8 Chris Aniszczyk CLA 2011-04-15 14:21:00 EDT
Not bad, I'd name it just "Git Search" for simplicity.
Comment 9 Kevin Sawicki CLA 2011-04-15 14:25:00 EDT
Yeah, sounds good, see bug343000 for screenshot of editor that
opens when commit is double-clicked from search view.
Comment 10 Chris Aniszczyk CLA 2011-04-15 14:27:58 EDT
(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?
Comment 11 Kevin Sawicki CLA 2011-04-15 14:30:41 EDT
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.
Comment 12 Kevin Sawicki CLA 2011-05-03 22:38:03 EDT
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.
Comment 13 Chris Aniszczyk CLA 2011-05-04 07:10:34 EDT
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.
Comment 14 Chris Aniszczyk CLA 2011-05-12 21:06:25 EDT
Merged as 2c117553bff2e31b4f1fa4f1048e6670ca11a396.

Please open other bugs for enhancement ideas or issues.