Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw exception when trying to init a root branch #390

Merged
merged 2 commits into from
Jun 12, 2013

Conversation

pmiossec
Copy link
Member

@pmiossec pmiossec commented Jun 5, 2013

A root branch has no parents and that's a branch that should be cloned instead of inited!

if (tfsBranchToCreate.Properties.ParentBranch == null)
{
throw new GitTfsException("error : the branch you try to init '" + tfsPathBranchToCreate + "' is a root branch (e.g. has no parents).",
new List<string>{"Clone this branch from Tfs instead of trying to init it!"});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to show the exact command to run? If so, let's include that here.

@spraints
Copy link
Member

spraints commented Jun 5, 2013

If some documentation would help, can you also add some in the doc/ directory? (The wiki was moved yesterday to doc/ so that we can have docs and code come in on the same branch.)

A root branch has no parents and that's a branch that should be cloned instead of inited!
@pmiossec
Copy link
Member Author

pmiossec commented Jun 5, 2013

done

@sc68cal
Copy link
Contributor

sc68cal commented Jun 11, 2013

👍

@spraints
Copy link
Member

sweeeeeet

spraints added a commit that referenced this pull request Jun 12, 2013
throw exception when trying to init a root branch
@spraints spraints merged commit aecc96d into git-tfs:master Jun 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants