{"action":"opened","issue":{"url":"https://api.github.com/repos/google/git-appraise/issues/66","repository_url":"https://api.github.com/repos/google/git-appraise","labels_url":"https://api.github.com/repos/google/git-appraise/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/google/git-appraise/issues/66/comments","events_url":"https://api.github.com/repos/google/git-appraise/issues/66/events","html_url":"https://github.com/google/git-appraise/issues/66","id":181769748,"number":66,"title":"Better support the 0-state","user":{"login":"ojarjur","id":3039877,"avatar_url":"https://avatars.githubusercontent.com/u/3039877?v=3","gravatar_id":"","url":"https://api.github.com/users/ojarjur","html_url":"https://github.com/ojarjur","followers_url":"https://api.github.com/users/ojarjur/followers","following_url":"https://api.github.com/users/ojarjur/following{/other_user}","gists_url":"https://api.github.com/users/ojarjur/gists{/gist_id}","starred_url":"https://api.github.com/users/ojarjur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojarjur/subscriptions","organizations_url":"https://api.github.com/users/ojarjur/orgs","repos_url":"https://api.github.com/users/ojarjur/repos","events_url":"https://api.github.com/users/ojarjur/events{/privacy}","received_events_url":"https://api.github.com/users/ojarjur/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/git-appraise/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"ojarjur","id":3039877,"avatar_url":"https://avatars.githubusercontent.com/u/3039877?v=3","gravatar_id":"","url":"https://api.github.com/users/ojarjur","html_url":"https://github.com/ojarjur","followers_url":"https://api.github.com/users/ojarjur/followers","following_url":"https://api.github.com/users/ojarjur/following{/other_user}","gists_url":"https://api.github.com/users/ojarjur/gists{/gist_id}","starred_url":"https://api.github.com/users/ojarjur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojarjur/subscriptions","organizations_url":"https://api.github.com/users/ojarjur/orgs","repos_url":"https://api.github.com/users/ojarjur/repos","events_url":"https://api.github.com/users/ojarjur/events{/privacy}","received_events_url":"https://api.github.com/users/ojarjur/received_events","type":"User","site_admin":false},"assignees":[{"login":"ojarjur","id":3039877,"avatar_url":"https://avatars.githubusercontent.com/u/3039877?v=3","gravatar_id":"","url":"https://api.github.com/users/ojarjur","html_url":"https://github.com/ojarjur","followers_url":"https://api.github.com/users/ojarjur/followers","following_url":"https://api.github.com/users/ojarjur/following{/other_user}","gists_url":"https://api.github.com/users/ojarjur/gists{/gist_id}","starred_url":"https://api.github.com/users/ojarjur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojarjur/subscriptions","organizations_url":"https://api.github.com/users/ojarjur/orgs","repos_url":"https://api.github.com/users/ojarjur/repos","events_url":"https://api.github.com/users/ojarjur/events{/privacy}","received_events_url":"https://api.github.com/users/ojarjur/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-10-07T21:18:14Z","updated_at":"2016-10-07T21:18:14Z","closed_at":null,"body":"Right now git-appraise assumes that there is an existing target ref and review ref, which have different head commits but for which there is a merge base.\r\n\r\nThose assumptions are fine for most usage, but it is easy for someone just trying out git-appraise for the first time to not satisfy them, and the existing error message can be quite cryptic when that happens.\r\n\r\nTo improve this situation, we should change the user experience in the following situations:\r\n\r\n1. If the target ref (by default `refs/heads/master`) does not exist, but the review ref does:\r\n    We should support this as a valid use case, and create a review anchored at the first (oldest) commit.\r\n2. If both the target ref and review ref exist, but they have no commits in common (and, thus, no merge base):\r\n    This is conceptually quite similar to the first scenario. We should support this as a valid use case, and create a review anchored at the first (oldest) commit in the review ref.\r\n3. If neither the target nor the review ref exists:\r\n    This is not a valid use case, but the current error message (\"fatal: 'refs/heads/master' - not a valid ref\") does not explain that. We should change this to something like \"You cannot create a review in an empty repository. First, commit the changes that you want to review\".\r\n4. If the target and review ref are the same:\r\n    This is not a valid use case, but the current error message (\"There are no commits included in the review request\") does not explain that. We should change this to something like \"Before you can create a review you need to have two different branches to compare\".\r\n\r\nThere is also the scenario that the target ref exists but the review ref does not. However, that is not a valid scenario, and the current error message is probably sufficient."}}
{"actor":{"display_login":"ojarjur"}}