diff --git a/PBGitHistoryController.h b/PBGitHistoryController.h index f87c462..f9b7f8f 100644 --- a/PBGitHistoryController.h +++ b/PBGitHistoryController.h @@ -41,6 +41,7 @@ - (IBAction) toggleQuickView: sender; - (IBAction) openSelectedFile: sender; - (void) updateQuicklookForce: (BOOL) force; +- (void) showCommitsFromTree:(id) sender; - (void) copyCommitInfo; diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m index 9c18b72..6562465 100644 --- a/PBGitHistoryController.m +++ b/PBGitHistoryController.m @@ -218,4 +218,16 @@ return menu; } +- (void) showCommitsFromTree:(id) sender +{ + // TODO: Enable this from webview as well! + + NSMutableArray *filePaths = [NSMutableArray arrayWithObjects:@"HEAD", @"--", NULL]; + for (PBGitTree *tree in [treeController selectedObjects]) + [filePaths addObject:[tree fullPath]]; + PBGitRevSpecifier *revSpec = [[PBGitRevSpecifier alloc] initWithParameters:filePaths]; + + repository.currentBranch = [repository addBranch:revSpec]; +} + @end diff --git a/PBGitHistoryView.xib b/PBGitHistoryView.xib index 1a06286..2fdd4fa 100644 --- a/PBGitHistoryView.xib +++ b/PBGitHistoryView.xib @@ -2,12 +2,13 @@ 1050 - 9G55 + 9J61 677 - 949.43 + 949.46 353.00 YES + @@ -345,6 +346,7 @@ YES Apple HTML pasteboard type + Apple PDF pasteboard type Apple PICT pasteboard type Apple URL pasteboard type Apple Web Archive pasteboard type @@ -355,6 +357,7 @@ NeXT Rich Text Format v1.0 pasteboard type NeXT TIFF v4.0 pasteboard type WebURLsWithTitlesPboardType + public.png public.url public.url-name @@ -1515,6 +1518,20 @@ YES + + + + YES + + + Commits touching paths + + 2147483647 + + + + + @@ -2105,6 +2122,22 @@ 274 + + + showCommitsFromTree: + + + + 281 + + + + menu + + + + 282 + @@ -2735,6 +2768,20 @@ + + 276 + + + YES + + + + + + 275 + + + @@ -2814,6 +2861,9 @@ 27.ImportedFromIB2 272.IBPluginDependency 273.IBPluginDependency + 275.IBPluginDependency + 276.IBEditorWindowLastContentRect + 276.IBPluginDependency 28.IBPluginDependency 28.IBShouldRemoveOnLegacySave 29.IBPluginDependency @@ -2945,6 +2995,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{126, 715}, {223, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2978,7 +3031,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{321, 79}, {852, 432}} + {{59, 317}, {852, 432}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3013,7 +3066,7 @@ - 274 + 282 @@ -3032,7 +3085,7 @@ YES PBGitHistoryController - id + PBWebHistoryController WebView @@ -3053,6 +3106,7 @@ setDetailedView: setRawView: setTreeView: + showCommitsFromTree: toggleQuickView: @@ -3063,6 +3117,7 @@ id id id + id