{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/26809","labels_url":"https://api.github.com/repos/saltstack/salt/issues/26809/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/26809/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/26809/events","html_url":"https://github.com/saltstack/salt/issues/26809","id":104227290,"number":26809,"title":"git.latest and empty repositories","user":{"login":"anlutro","id":163093,"avatar_url":"https://avatars.githubusercontent.com/u/163093?v=3","gravatar_id":"","url":"https://api.github.com/users/anlutro","html_url":"https://github.com/anlutro","followers_url":"https://api.github.com/users/anlutro/followers","following_url":"https://api.github.com/users/anlutro/following{/other_user}","gists_url":"https://api.github.com/users/anlutro/gists{/gist_id}","starred_url":"https://api.github.com/users/anlutro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anlutro/subscriptions","organizations_url":"https://api.github.com/users/anlutro/orgs","repos_url":"https://api.github.com/users/anlutro/repos","events_url":"https://api.github.com/users/anlutro/events{/privacy}","received_events_url":"https://api.github.com/users/anlutro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-01T09:43:05Z","updated_at":"2015-09-01T18:02:17Z","closed_at":null,"body":"Currently, it's not possible to have a `git.latest` pointing towards an empty repository. This was possible in 2015.5 and earlier.\r\n\r\nThe code that triggers the error: https://github.com/saltstack/salt/blob/f0c9dff9bf74c8a988ad1c60c77a8877166b2eb4/salt/states/git.py#L514-L521\r\n\r\nAn easy(?) fix could be to add an `allow_empty` argument to the state.\r\n\r\nPing @terminalmage "},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/136813453","html_url":"https://github.com/saltstack/salt/issues/26809#issuecomment-136813453","issue_url":"https://api.github.com/repos/saltstack/salt/issues/26809","id":136813453,"user":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T18:02:17Z","updated_at":"2015-09-01T18:02:17Z","body":"@anlutro see https://github.com/saltstack/salt/pull/26818"}}