7 Commits

Author SHA1 Message Date
German Laullon ac1019d5cc no libgit2 2011-05-20 00:46:13 +02:00
Uwe Hees 5fc5929e2f Follow name changes when searching for file paths to get the full history. 2011-04-27 23:27:15 +02:00
Nathan Kinsinger c605b74476 Add a File Path search mode
Highlights any commit that touches a file.

The "Show history of file" context menu item will now set the path search instead of creating a rev specifier.
2010-09-12 19:33:01 -06:00
Nathan Kinsinger e56ca103ca Add search commands to the gitx cli
-s or --search= for searching in subject, author or SHA
-S or --Search= for git's pickaxe string matching
-r or --regex= for git's pickaxe regex matching
2010-09-12 19:32:47 -06:00
Nathan Kinsinger 71cdb0dbe0 Add search modes for git pickaxe
Add two new search modes to search the commits for strings that were added or removed in a commit.
    - match by string or an extended POSIX regex (see man git-log -S<string> and --pickaxe-regex)
    - include the modes in the search menu
    - store the current mode in user defaults
    - show progress indicator when search takes time
2010-09-12 19:32:44 -06:00
Nathan Kinsinger 62aa99b761 Add a recent searches menu to the search field 2010-09-12 19:32:40 -06:00
Nathan Kinsinger 4fad6b60a3 Improve search UI
Previously searching would filter the commits in the commit tableview to only show the commits that matched the search. However the context of where those commits exist in the history is lost.

With this patch all the commits are shown but the commits that match the search are highlighted with a light blue background. In addition there is a forward/back button to step through the matches.

A new search controller:
    - keeps track of the matching results
    - finds the next or previous result
    - displays the number of matches found or "Not found"
    - shows/hides the # of matches text and the next/last stepper button
    - shows a small bezel style window with a rewind icon indicating that the selection has cycled (pressing next when at the last match or previous when at the first)
    - sets up the search predicate which covers Subject, Author and SHA (previously this was three different searches)
    - stores search results in an NSIndexSet to make finding if a row is in the set faster (needed at drawing time)

Highlighting of search result rows is done in PBCommitList -drawRow:clipRect:

PBGitTextFieldCell is a subclass of NSTextFieldCell that disables the cell's selection highlighting.

Supporting Find Next and Find Previous (cmd-g and cmd-shift-g) menu commands required changing the action method of the menu items because NSTextFields (seem to) actively disable items in the Find menu.

rewindImage.pdf created by Nathan Kinsinger
2010-09-12 19:32:36 -06:00