{"action":"created","issue":{"url":"https://api.github.com/repos/git-tfs/git-tfs/issues/869","labels_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/869/comments","events_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/869/events","html_url":"https://github.com/git-tfs/git-tfs/issues/869","id":115923716,"number":869,"title":"Object reference not set to an instance of an object.","user":{"login":"justinjstark","id":214307,"avatar_url":"https://avatars.githubusercontent.com/u/214307?v=3","gravatar_id":"","url":"https://api.github.com/users/justinjstark","html_url":"https://github.com/justinjstark","followers_url":"https://api.github.com/users/justinjstark/followers","following_url":"https://api.github.com/users/justinjstark/following{/other_user}","gists_url":"https://api.github.com/users/justinjstark/gists{/gist_id}","starred_url":"https://api.github.com/users/justinjstark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinjstark/subscriptions","organizations_url":"https://api.github.com/users/justinjstark/orgs","repos_url":"https://api.github.com/users/justinjstark/repos","events_url":"https://api.github.com/users/justinjstark/events{/privacy}","received_events_url":"https://api.github.com/users/justinjstark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-09T17:19:28Z","updated_at":"2015-11-09T20:00:36Z","closed_at":null,"body":"I installed git-tfs c0.23.0.0 from chocolatey. I'm on TFS 2008. I cannot clone a TFS repository. The stacktrace is below. I am using the $// trick from #845 to fix the POSIX path mangling.\r\n\r\n$ git tfs version\r\ngit-tfs version 0.23.0.0 (TFS client library 12.0.0.0 (MS)) (64-bit)\r\nC:\\tools\\gittfs\\git-tfs.exe\r\n\r\n$ git tfs clone -d http://server:8080/tfs/dir%20dir2 \"$//path1/path2/\" test\r\nCommand run:git tfs clone -d http://server:8080/tfs/dir1%20dir2 $//path1/path2/ test\r\nNo authors file used.\r\ngit-tfs version 0.23.0.0 (TFS client library 12.0.0.0 (MS)) (64-bit)\r\ngit command: Starting process: git init\r\nInitialized empty Git repository in C:/Git/test/.git/\r\ngit command time: [00:00:00.0310031] init\r\nwarning: you are going to clone the whole repository or too high in the repository path !\r\n   => If you want to manage branches with git-tfs, clone one of this branch instead :\r\n - $/path1/path2/Main\r\n\r\nPS:if your branch is not listed here, perhaps you should convert the containing\r\nfolder to a branch in TFS.\r\nFetching from TFS remote 'default'...\r\ninfo: refs/remotes/tfs/default: Getting changesets from 1 to -1 ...\r\nSetting up a TFS workspace at .git\\~w\r\nTFS Workspace 'git-tfs-54e78c5c-a911-4913-9df8-9ed041458517;NADF\\J1132' was removed.\r\nCleaning...\r\nSep.Git.Tfs.Core.GitTfsException: error: a problem occured when trying to clone\r\nthe repository. Try to solve the problem described below.\r\nIn any case, after, try to continue using command `git tfs fetch`\r\n ---> System.NullReferenceException: Object reference not set to an instance of\r\nan object.\r\n   at Sep.Git.Tfs.Util.ChangeSieve.GetChangesToApply(Boolean forceGetChanges)\r\n   at Sep.Git.Tfs.Core.TfsChangeset.Apply(String lastCommit, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary`2 initialTree, Action`1 ignorableErrorHandler)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.<>c__DisplayClass21.<Apply>b__20(ITfsWorkspace workspace)\r\n   at Sep.Git.Tfs.VsCommon.TfsHelperBase.WithWorkspace(String localDirectory, IGitTfsRemote remote, TfsChangesetInfo versionToFetch, Action`1 action)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.WithWorkspace(TfsChangesetInfo parentChangeset, Action`1 action)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.Apply(String parent, ITfsChangeset changeset, IDictionary`2 entries, Action`1 ignorableErrorHandler)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.FetchWithMerge(Int64 mergeChangesetId, Boolean stopOnFailMergeCommit, Int32 lastChangesetIdToFetch, IRenameResult renameResult, String[] parentCommitsHashes)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.Fetch(Boolean stopOnFailMergeCommit, IRenameResult renameResult)\r\n   at Sep.Git.Tfs.Commands.Fetch.DoFetch(IGitTfsRemote remote, Boolean stopOnFailMergeCommit)\r\n   at Sep.Git.Tfs.Commands.Fetch.FetchRemote(Boolean stopOnFailMergeCommit, IGitTfsRemote remote)\r\n   at Sep.Git.Tfs.Commands.Fetch.Run(Boolean stopOnFailMergeCommit, String[] args)\r\n   at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, String gitRepositoryPath)\r\n   --- End of inner exception stack trace ---\r\n   at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 args)\r\n   at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs)\r\n   at Sep.Git.Tfs.Program.Main(String[] args)\r\nerror: a problem occured when trying to clone the repository. Try to solve the problem described below.\r\nIn any case, after, try to continue using command `git tfs fetch`\r\n\r\nSystem.NullReferenceException: Object reference not set to an instance of an object.\r\n   at Sep.Git.Tfs.Util.ChangeSieve.GetChangesToApply(Boolean forceGetChanges)\r\n   at Sep.Git.Tfs.Core.TfsChangeset.Apply(String lastCommit, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary`2 initialTree, Action`1 ignorableErrorHandler)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.<>c__DisplayClass21.<Apply>b__20(ITfsWorkspace workspace)\r\n   at Sep.Git.Tfs.VsCommon.TfsHelperBase.WithWorkspace(String localDirectory, IGitTfsRemote remote, TfsChangesetInfo versionToFetch, Action`1 action)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.WithWorkspace(TfsChangesetInfo parentChangeset, Action`1 action)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.Apply(String parent, ITfsChangeset changeset, IDictionary`2 entries, Action`1 ignorableErrorHandler)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.FetchWithMerge(Int64 mergeChangesetId, Boolean stopOnFailMergeCommit, Int32 lastChangesetIdToFetch, IRenameResult renameResult, String[] parentCommitsHashes)\r\n   at Sep.Git.Tfs.Core.GitTfsRemote.Fetch(Boolean stopOnFailMergeCommit, IRenameResult renameResult)\r\n   at Sep.Git.Tfs.Commands.Fetch.DoFetch(IGitTfsRemote remote, Boolean stopOnFailMergeCommit)\r\n   at Sep.Git.Tfs.Commands.Fetch.FetchRemote(Boolean stopOnFailMergeCommit, IGitTfsRemote remote)\r\n   at Sep.Git.Tfs.Commands.Fetch.Run(Boolean stopOnFailMergeCommit, String[] args)\r\n   at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, String gitRepositoryPath)\r\nObject reference not set to an instance of an object."},"comment":{"url":"https://api.github.com/repos/git-tfs/git-tfs/issues/comments/155174324","html_url":"https://github.com/git-tfs/git-tfs/issues/869#issuecomment-155174324","issue_url":"https://api.github.com/repos/git-tfs/git-tfs/issues/869","id":155174324,"user":{"login":"pmiossec","id":460196,"avatar_url":"https://avatars.githubusercontent.com/u/460196?v=3","gravatar_id":"","url":"https://api.github.com/users/pmiossec","html_url":"https://github.com/pmiossec","followers_url":"https://api.github.com/users/pmiossec/followers","following_url":"https://api.github.com/users/pmiossec/following{/other_user}","gists_url":"https://api.github.com/users/pmiossec/gists{/gist_id}","starred_url":"https://api.github.com/users/pmiossec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmiossec/subscriptions","organizations_url":"https://api.github.com/users/pmiossec/orgs","repos_url":"https://api.github.com/users/pmiossec/repos","events_url":"https://api.github.com/users/pmiossec/events{/privacy}","received_events_url":"https://api.github.com/users/pmiossec/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T20:00:36Z","updated_at":"2015-11-09T20:00:36Z","body":"git-tfs nor more support tfs2008 but you could try :\r\n\r\n* to set the  `GIT_TFS_CLIENT` environment variable to `2010` which is nearer than the version of TFS assemblies, 2013, that you use (you should have the TFS assemblies installed)\r\n* use `--ignore-branches` because branches are not supported with tfs2008 (the notions didn't even exist!!!). It should have been detected but we're not really sure when tfs is concerned...\r\n* you history seems bogus so, you should perhaps clone from a more recent history (perhaps the few last changesets, I'm sorry... :( ) and for that, you could use the option `--changeset=VALUE` with `VALUE`, the id of a changeset.\r\n\r\nI hope it will help you. Otherwise you will have to dig in the code :(\r\n\r\nSomething that could help (and that we should have made default), use `--batch-size=3` to speed a little the download of the first changesets...\r\n\r\nFeel free to llok at our documentation for more help: https://github.com/git-tfs/git-tfs/blob/master/doc/commands/clone.md"}}