spraints/git-tfs — Issue #96: git tfs clone doesn't seem to set up refs remote?
Author: bluerv
Created: 2011-10-24 14:20:36+00:00
State: open

I'm using Version=0.12.0.0 of git tfs. I'm trying to create a brand new repository using clone, but, it appears as if it's not setting up the repository correctly? Maybe? Or I'm using it wrong, but I'm following the instructions here:

http://www.richard-banks.org/2010/04/git-tfs-working-together-version-2.html

Here's the -d results from git tfs clone (server name changed to protect the innocent), and there is a refs folder created, but there is no remotes folder under refs:

----

git tfs clone -d http://MyTFSServer:8080/tfs $/HIC/Portal . > foo.txt

git command: Starting process: git init
Initialized empty Git repository in c:/Development/HIC2/.git/
git command time: [00:00:00.3588115] init
git command: Starting process: git config core.autocrlf false
git command time: [00:00:00.0156005] config core.autocrlf false
git command: Starting process: git config --list
git command time: [00:00:00.0312010] config --list
git command: Starting process: git config tfs-remote.default.url http://MyTFSServer:8080/tfs
git command time: [00:00:00.0156005] config tfs-remote.default.url http://MyTFSServer:8080/tfs
git command: Starting process: git config tfs-remote.default.repository $/HIC/Portal
git command time: [00:00:00.0312010] config tfs-remote.default.repository $/HIC/Portal
git command: Starting process: git config tfs-remote.default.fetch refs/remotes/default/master
git command time: [00:00:00.0156005] config tfs-remote.default.fetch refs/remotes/default/master
git command: Starting process: git config --list
git command time: [00:00:00.1092035] config --list
Fetching from TFS remote default
git command: Starting process: git log --no-color --pretty=medium refs/remotes/tfs/default
git stderr: fatal: ambiguous argument 'refs/remotes/tfs/default': unknown revision or path not in the working tree.
git stderr: Use '--' to separate paths from revisions
git command time: [00:00:00.0156005] log --no-color --pretty=medium refs/remotes/tfs/default
An error occurred while loading head refs/remotes/tfs/default (maybe it doesn't exist?): Sep.Git.Tfs.Core.GitCommandException: Command exited with error code.
at Sep.Git.Tfs.Core.GitHelpers.Close(Process process) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 196
at Sep.Git.Tfs.Core.GitHelpers.<>c__DisplayClass8.b__7() in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 58
at Sep.Git.Tfs.Core.GitHelpers.Time(String[] command, Action action) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 182
at Sep.Git.Tfs.Core.GitHelpers.CommandOutputPipe(Action`1 handleOutput, String[] command) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 53
at Sep.Git.Tfs.Core.GitRepository.GetParentTfsCommits(String head, Boolean includeStubRemotes) in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 244
git command: Starting process: git log --no-color --pretty=medium refs/remotes/tfs/default..HEAD
git stderr: fatal: ambiguous argument 'refs/remotes/tfs/default..HEAD': unknown revision or path not in the working tree.
git stderr: Use '--' to separate paths from revisions
git command time: [00:00:00.0156005] log --no-color --pretty=medium refs/remotes/tfs/default..HEAD
An error occurred while loading head refs/remotes/tfs/default..HEAD (maybe it doesn't exist?): Sep.Git.Tfs.Core.GitCommandException: Command exited with error code.
at Sep.Git.Tfs.Core.GitHelpers.Close(Process process) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 196
at Sep.Git.Tfs.Core.GitHelpers.<>c__DisplayClass8.b__7() in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 58
at Sep.Git.Tfs.Core.GitHelpers.Time(String[] command, Action action) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 182
at Sep.Git.Tfs.Core.GitHelpers.CommandOutputPipe(Action`1 handleOutput, String[] command) in D:\work\git-tfs\GitTfs\Core\GitHelpers.cs:line 53
at Sep.Git.Tfs.Core.GitRepository.GetParentTfsCommits(String head, Boolean includeStubRemotes) in D:\work\git-tfs\GitTfs\Core\GitRepository.cs:line 244
info: refs/remotes/tfs/default: Getting changesets from 1 to current ...
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Sep.Git.Tfs.VsCommon.TfsHelperBase.GetLatestChangeset(GitTfsRemote remote)
at Sep.Git.Tfs.Core.GitTfsRemote.FetchChangesets() in D:\work\git-tfs\GitTfs\Core\GitTfsRemote.cs:line 206
at Sep.Git.Tfs.Core.GitTfsRemote.FetchWithMerge(Int64 mergeChangesetId, String[] parentCommitsHashes) in D:\work\git-tfs\GitTfs\Core\GitTfsRemote.cs:line 159
at Sep.Git.Tfs.Core.GitTfsRemote.Fetch() in D:\work\git-tfs\GitTfs\Core\GitTfsRemote.cs:line 154
at Sep.Git.Tfs.Commands.Fetch.DoFetch(IGitTfsRemote remote) in D:\work\git-tfs\GitTfs\Commands\Fetch.cs:line 70
at Sep.Git.Tfs.Commands.Fetch.Run(String[] args) in D:\work\git-tfs\GitTfs\Commands\Fetch.cs:line 57
at Sep.Git.Tfs.Commands.Fetch.Run() in D:\work\git-tfs\GitTfs\Commands\Fetch.cs:line 49
at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, String gitRepositoryPath) in D:\work\git-tfs\GitTfs\Commands\Clone.cs:line 39
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 args) in D:\work\git-tfs\GitTfs\Util\GitTfsCommandRunner.cs:line 36
at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs) in D:\work\git-tfs\GitTfs\GitTfs.cs:line 56
at Sep.Git.Tfs.GitTfs.Run(IList`1 args) in D:\work\git-tfs\GitTfs\GitTfs.cs:line 39
at Sep.Git.Tfs.Program.Main(String[] args) in D:\work\git-tfs\GitTfs\Program.cs:line 23
Sequence contains no elements

----