{"action":"created","comment":{"url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/comments/174738441","pull_request_review_id":104147619,"id":174738441,"diff_hunk":"@@ -164,21 +155,56 @@ protected override void OnRuntimeLoad(EventArgs e)\n \n         private string DescribeRevision(string sha1)\n         {\n+            return DescribeRevision(sha1, 0);\n+        }\n+\n+        private string DescribeRevision(string sha1, int maxLength)\n+        {\n+            if (sha1.IsNullOrEmpty())\n+            {\n+                // No parent at all, present as working directory\n+                return Strings.GetCurrentUnstagedChanges();\n+            }\n+\n             var revision = _revisionGrid.GetRevision(sha1);\n             if (revision == null)\n             {\n                 return sha1.ShortenTo(8);\n             }\n \n-            return _revisionGrid.DescribeRevision(revision);\n+            return _revisionGrid.DescribeRevision(revision, maxLength);\n+        }\n+\n+        /// <summary>\n+        /// Provide a description for the first selected or parent to the \"primary\" selected last\n+        /// </summary>\n+        /// <returns>A description of the selected parent</returns>\n+        private string DescribeSelectedParentRevision(bool showUnstagedAndCombined)\n+        {\n+            var parents = DiffFiles.SelectedItemParents\n+                .Where(i => showUnstagedAndCombined ||\n+                    !(i.Guid.IsNullOrWhiteSpace() || i.Guid == GitRevision.UnstagedGuid || i.Guid == DiffFiles.CombinedDiff.Text))","path":"GitUI/CommandsDialogs/RevisionDiff.cs","position":135,"original_position":135,"commit_id":"dd11338bd32a2ae78ac247d5cb22252489a03d5f","original_commit_id":"dd11338bd32a2ae78ac247d5cb22252489a03d5f","user":{"login":"RussKie","id":4403806,"avatar_url":"https://avatars3.githubusercontent.com/u/4403806?v=4","gravatar_id":"","url":"https://api.github.com/users/RussKie","html_url":"https://github.com/RussKie","followers_url":"https://api.github.com/users/RussKie/followers","following_url":"https://api.github.com/users/RussKie/following{/other_user}","gists_url":"https://api.github.com/users/RussKie/gists{/gist_id}","starred_url":"https://api.github.com/users/RussKie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RussKie/subscriptions","organizations_url":"https://api.github.com/users/RussKie/orgs","repos_url":"https://api.github.com/users/RussKie/repos","events_url":"https://api.github.com/users/RussKie/events{/privacy}","received_events_url":"https://api.github.com/users/RussKie/received_events","type":"User","site_admin":false},"body":"Something doesn't feel right about it.... can't articulate what exactly, but it feels bad","created_at":"2018-03-15T10:35:52Z","updated_at":"2018-03-15T10:35:52Z","html_url":"https://github.com/gitextensions/gitextensions/pull/4569#discussion_r174738441","pull_request_url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gitextensions/gitextensions/pulls/comments/174738441"},"html":{"href":"https://github.com/gitextensions/gitextensions/pull/4569#discussion_r174738441"},"pull_request":{"href":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569"}},"in_reply_to_id":174689699},"pull_request":{"url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569","id":172732019,"html_url":"https://github.com/gitextensions/gitextensions/pull/4569","diff_url":"https://github.com/gitextensions/gitextensions/pull/4569.diff","patch_url":"https://github.com/gitextensions/gitextensions/pull/4569.patch","issue_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4569","number":4569,"state":"open","locked":false,"title":"Browse Diff tab menu alternatives and presentation","user":{"login":"gerhardol","id":6248932,"avatar_url":"https://avatars1.githubusercontent.com/u/6248932?v=4","gravatar_id":"","url":"https://api.github.com/users/gerhardol","html_url":"https://github.com/gerhardol","followers_url":"https://api.github.com/users/gerhardol/followers","following_url":"https://api.github.com/users/gerhardol/following{/other_user}","gists_url":"https://api.github.com/users/gerhardol/gists{/gist_id}","starred_url":"https://api.github.com/users/gerhardol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerhardol/subscriptions","organizations_url":"https://api.github.com/users/gerhardol/orgs","repos_url":"https://api.github.com/users/gerhardol/repos","events_url":"https://api.github.com/users/gerhardol/events{/privacy}","received_events_url":"https://api.github.com/users/gerhardol/received_events","type":"User","site_admin":false},"body":"Fixes #4564\r\nFixes #4387\r\nFixes #4396\r\n\r\nNote: Due to the structure of tests in a separate class, it is very difficult to split this issue in several commits. First commit was PR #4566, partly reviewed. (Depended on merged commits #4562 #4563 #4565 #4567 #4568)\r\n\r\n\r\nTests:\r\nRewrote RevisionDiffController to make it possible to have some kind of tests. The tests are retrofitted to the current functionality as they are just testing the menu items and not the actions themselves. (The tests adds may more maintenance than they give benefits but the formal test coverage increases.)\r\n\r\nBrowse Diff:\r\nSubmodules actions available for multi select (#4568)\r\nPresents the Reset options for the correct parent in multi select situations\r\nNo longer differ between parent-child and first-second for Reset\r\nDifftool: Describes A and B revisions in the menu\r\nDifftool arguments depends on parent availability\r\nBetter detection of parents to A/B for diffs\r\n\r\nCommit:\r\nLimit DiffTool and FileHistory to tracked\r\n\r\nFormDiff:\r\nLimit FileHistory to Tracked\r\nUse RevisionDiffController to align to Browse-Diff for difftool\r\n \r\nScreenshots before and after (if PR changes UI):\r\n-\r\n![image](https://user-images.githubusercontent.com/6248932/36948593-60e9560a-1fdd-11e8-9206-d77d8acb150b.png)\r\n![image](https://user-images.githubusercontent.com/6248932/36948595-7524f2be-1fdd-11e8-918e-078c00545647.png)\r\n![image](https://user-images.githubusercontent.com/6248932/36948620-abd497ce-1fdd-11e8-8549-d4246dd619a4.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6248932/36948634-019fa432-1fde-11e8-92a9-b8dbb5fcc422.png)\r\n![image](https://user-images.githubusercontent.com/6248932/36948644-2d5d6b54-1fde-11e8-8da3-0e3e2f9379b9.png)\r\n![image](https://user-images.githubusercontent.com/6248932/36948629-df36db72-1fdd-11e8-8941-a78997bf361e.png)\r\n\r\n\r\nWhat did I do to test the code and ensure quality:\r\n - Added tests\r\n - Manual testing\r\n\r\nHas been tested on (remove any that don't apply):\r\n - Windows 10\r\n","created_at":"2018-03-04T18:00:54Z","updated_at":"2018-03-15T10:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a88f9578956495029c9231526b901a80708c9e9e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569/commits","review_comments_url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569/comments","review_comment_url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4569/comments","statuses_url":"https://api.github.com/repos/gitextensions/gitextensions/statuses/dd11338bd32a2ae78ac247d5cb22252489a03d5f","head":{"label":"gerhardol:feature/n4564-n4387-browsediff-multiple-revisions","ref":"feature/n4564-n4387-browsediff-multiple-revisions","sha":"dd11338bd32a2ae78ac247d5cb22252489a03d5f","user":{"login":"gerhardol","id":6248932,"avatar_url":"https://avatars1.githubusercontent.com/u/6248932?v=4","gravatar_id":"","url":"https://api.github.com/users/gerhardol","html_url":"https://github.com/gerhardol","followers_url":"https://api.github.com/users/gerhardol/followers","following_url":"https://api.github.com/users/gerhardol/following{/other_user}","gists_url":"https://api.github.com/users/gerhardol/gists{/gist_id}","starred_url":"https://api.github.com/users/gerhardol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerhardol/subscriptions","organizations_url":"https://api.github.com/users/gerhardol/orgs","repos_url":"https://api.github.com/users/gerhardol/repos","events_url":"https://api.github.com/users/gerhardol/events{/privacy}","received_events_url":"https://api.github.com/users/gerhardol/received_events","type":"User","site_admin":false},"repo":{"id":106106379,"name":"gitextensions","full_name":"gerhardol/gitextensions","owner":{"login":"gerhardol","id":6248932,"avatar_url":"https://avatars1.githubusercontent.com/u/6248932?v=4","gravatar_id":"","url":"https://api.github.com/users/gerhardol","html_url":"https://github.com/gerhardol","followers_url":"https://api.github.com/users/gerhardol/followers","following_url":"https://api.github.com/users/gerhardol/following{/other_user}","gists_url":"https://api.github.com/users/gerhardol/gists{/gist_id}","starred_url":"https://api.github.com/users/gerhardol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerhardol/subscriptions","organizations_url":"https://api.github.com/users/gerhardol/orgs","repos_url":"https://api.github.com/users/gerhardol/repos","events_url":"https://api.github.com/users/gerhardol/events{/privacy}","received_events_url":"https://api.github.com/users/gerhardol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gerhardol/gitextensions","description":"GitExtensions is a shell extension, a Visual Studio 2010-2015 plugin and a standalone Git repository tool.","fork":true,"url":"https://api.github.com/repos/gerhardol/gitextensions","forks_url":"https://api.github.com/repos/gerhardol/gitextensions/forks","keys_url":"https://api.github.com/repos/gerhardol/gitextensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gerhardol/gitextensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gerhardol/gitextensions/teams","hooks_url":"https://api.github.com/repos/gerhardol/gitextensions/hooks","issue_events_url":"https://api.github.com/repos/gerhardol/gitextensions/issues/events{/number}","events_url":"https://api.github.com/repos/gerhardol/gitextensions/events","assignees_url":"https://api.github.com/repos/gerhardol/gitextensions/assignees{/user}","branches_url":"https://api.github.com/repos/gerhardol/gitextensions/branches{/branch}","tags_url":"https://api.github.com/repos/gerhardol/gitextensions/tags","blobs_url":"https://api.github.com/repos/gerhardol/gitextensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gerhardol/gitextensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gerhardol/gitextensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/gerhardol/gitextensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gerhardol/gitextensions/statuses/{sha}","languages_url":"https://api.github.com/repos/gerhardol/gitextensions/languages","stargazers_url":"https://api.github.com/repos/gerhardol/gitextensions/stargazers","contributors_url":"https://api.github.com/repos/gerhardol/gitextensions/contributors","subscribers_url":"https://api.github.com/repos/gerhardol/gitextensions/subscribers","subscription_url":"https://api.github.com/repos/gerhardol/gitextensions/subscription","commits_url":"https://api.github.com/repos/gerhardol/gitextensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/gerhardol/gitextensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/gerhardol/gitextensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/gerhardol/gitextensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/gerhardol/gitextensions/contents/{+path}","compare_url":"https://api.github.com/repos/gerhardol/gitextensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gerhardol/gitextensions/merges","archive_url":"https://api.github.com/repos/gerhardol/gitextensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gerhardol/gitextensions/downloads","issues_url":"https://api.github.com/repos/gerhardol/gitextensions/issues{/number}","pulls_url":"https://api.github.com/repos/gerhardol/gitextensions/pulls{/number}","milestones_url":"https://api.github.com/repos/gerhardol/gitextensions/milestones{/number}","notifications_url":"https://api.github.com/repos/gerhardol/gitextensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gerhardol/gitextensions/labels{/name}","releases_url":"https://api.github.com/repos/gerhardol/gitextensions/releases{/id}","deployments_url":"https://api.github.com/repos/gerhardol/gitextensions/deployments","created_at":"2017-10-07T15:00:31Z","updated_at":"2018-02-17T12:55:04Z","pushed_at":"2018-03-14T22:29:44Z","git_url":"git://github.com/gerhardol/gitextensions.git","ssh_url":"git@github.com:gerhardol/gitextensions.git","clone_url":"https://github.com/gerhardol/gitextensions.git","svn_url":"https://github.com/gerhardol/gitextensions","homepage":"http://gitextensions.github.io/","size":66899,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"gitextensions:master","ref":"master","sha":"5047252f5eaa8b63387186c99a9fdbf3e1a4afb3","user":{"login":"gitextensions","id":1700077,"avatar_url":"https://avatars2.githubusercontent.com/u/1700077?v=4","gravatar_id":"","url":"https://api.github.com/users/gitextensions","html_url":"https://github.com/gitextensions","followers_url":"https://api.github.com/users/gitextensions/followers","following_url":"https://api.github.com/users/gitextensions/following{/other_user}","gists_url":"https://api.github.com/users/gitextensions/gists{/gist_id}","starred_url":"https://api.github.com/users/gitextensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitextensions/subscriptions","organizations_url":"https://api.github.com/users/gitextensions/orgs","repos_url":"https://api.github.com/users/gitextensions/repos","events_url":"https://api.github.com/users/gitextensions/events{/privacy}","received_events_url":"https://api.github.com/users/gitextensions/received_events","type":"Organization","site_admin":false},"repo":{"id":85953,"name":"gitextensions","full_name":"gitextensions/gitextensions","owner":{"login":"gitextensions","id":1700077,"avatar_url":"https://avatars2.githubusercontent.com/u/1700077?v=4","gravatar_id":"","url":"https://api.github.com/users/gitextensions","html_url":"https://github.com/gitextensions","followers_url":"https://api.github.com/users/gitextensions/followers","following_url":"https://api.github.com/users/gitextensions/following{/other_user}","gists_url":"https://api.github.com/users/gitextensions/gists{/gist_id}","starred_url":"https://api.github.com/users/gitextensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitextensions/subscriptions","organizations_url":"https://api.github.com/users/gitextensions/orgs","repos_url":"https://api.github.com/users/gitextensions/repos","events_url":"https://api.github.com/users/gitextensions/events{/privacy}","received_events_url":"https://api.github.com/users/gitextensions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitextensions/gitextensions","description":"Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2010/2012/2013/2015/2017).","fork":false,"url":"https://api.github.com/repos/gitextensions/gitextensions","forks_url":"https://api.github.com/repos/gitextensions/gitextensions/forks","keys_url":"https://api.github.com/repos/gitextensions/gitextensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitextensions/gitextensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitextensions/gitextensions/teams","hooks_url":"https://api.github.com/repos/gitextensions/gitextensions/hooks","issue_events_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/events{/number}","events_url":"https://api.github.com/repos/gitextensions/gitextensions/events","assignees_url":"https://api.github.com/repos/gitextensions/gitextensions/assignees{/user}","branches_url":"https://api.github.com/repos/gitextensions/gitextensions/branches{/branch}","tags_url":"https://api.github.com/repos/gitextensions/gitextensions/tags","blobs_url":"https://api.github.com/repos/gitextensions/gitextensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitextensions/gitextensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitextensions/gitextensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitextensions/gitextensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitextensions/gitextensions/statuses/{sha}","languages_url":"https://api.github.com/repos/gitextensions/gitextensions/languages","stargazers_url":"https://api.github.com/repos/gitextensions/gitextensions/stargazers","contributors_url":"https://api.github.com/repos/gitextensions/gitextensions/contributors","subscribers_url":"https://api.github.com/repos/gitextensions/gitextensions/subscribers","subscription_url":"https://api.github.com/repos/gitextensions/gitextensions/subscription","commits_url":"https://api.github.com/repos/gitextensions/gitextensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitextensions/gitextensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitextensions/gitextensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitextensions/gitextensions/contents/{+path}","compare_url":"https://api.github.com/repos/gitextensions/gitextensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitextensions/gitextensions/merges","archive_url":"https://api.github.com/repos/gitextensions/gitextensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitextensions/gitextensions/downloads","issues_url":"https://api.github.com/repos/gitextensions/gitextensions/issues{/number}","pulls_url":"https://api.github.com/repos/gitextensions/gitextensions/pulls{/number}","milestones_url":"https://api.github.com/repos/gitextensions/gitextensions/milestones{/number}","notifications_url":"https://api.github.com/repos/gitextensions/gitextensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitextensions/gitextensions/labels{/name}","releases_url":"https://api.github.com/repos/gitextensions/gitextensions/releases{/id}","deployments_url":"https://api.github.com/repos/gitextensions/gitextensions/deployments","created_at":"2008-12-06T09:18:59Z","updated_at":"2018-03-15T09:46:54Z","pushed_at":"2018-03-15T06:56:12Z","git_url":"git://github.com/gitextensions/gitextensions.git","ssh_url":"git@github.com:gitextensions/gitextensions.git","clone_url":"https://github.com/gitextensions/gitextensions.git","svn_url":"https://github.com/gitextensions/gitextensions","homepage":"http://gitextensions.github.io/","size":71424,"stargazers_count":2646,"watchers_count":2646,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":973,"mirror_url":null,"archived":false,"open_issues_count":697,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":973,"open_issues":697,"watchers":2646,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569"},"html":{"href":"https://github.com/gitextensions/gitextensions/pull/4569"},"issue":{"href":"https://api.github.com/repos/gitextensions/gitextensions/issues/4569"},"comments":{"href":"https://api.github.com/repos/gitextensions/gitextensions/issues/4569/comments"},"review_comments":{"href":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569/comments"},"review_comment":{"href":"https://api.github.com/repos/gitextensions/gitextensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4569/commits"},"statuses":{"href":"https://api.github.com/repos/gitextensions/gitextensions/statuses/dd11338bd32a2ae78ac247d5cb22252489a03d5f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"RussKie"}}