Skip to content

Commit

Permalink
correct --no-fetch option
Browse files Browse the repository at this point in the history
  • Loading branch information
pmiossec committed Mar 7, 2014
1 parent 97518c1 commit 34969bd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion GitTfs/Commands/Branch.cs
Expand Up @@ -54,7 +54,7 @@ public OptionSet OptionSet
{ "init", "Initialize an existing TFS branch", v => ShouldInitBranch = (v != null) },
{ "ignore-regex=", "A regex of files to ignore", v => IgnoreRegex = v },
{ "except-regex=", "A regex of exceptions to ignore-regex", v => ExceptRegex = v},
{ "no-fetch", "Don't fetch changeset for inited branch(es)", v => NoFetch = (v != null) },
{ "no-fetch", "Don't fetch changeset for newly initialized branch(es)", v => NoFetch = (v != null) },
{ "b|tfs-parent-branch=", "TFS Parent branch of the TFS branch to clone (TFS 2008 only! And required!!) ex: $/Repository/ProjectParentBranch", v => ParentBranch = v },
{ "u|username=", "TFS username", v => TfsUsername = v },
{ "p|password=", "TFS password", v => TfsPassword = v },
Expand Down
6 changes: 3 additions & 3 deletions GitTfs/Commands/InitBranch.cs
Expand Up @@ -57,7 +57,7 @@ public OptionSet OptionSet
{ "p|password=", "TFS password", v => TfsPassword = v },
{ "ignore-regex=", "A regex of files to ignore", v => IgnoreRegex = v },
{ "except-regex=", "A regex of exceptions to ignore-regex", v => ExceptRegex = v},
{ "nofetch", "Create the new TFS remote but don't fetch any changesets", v => NoFetch = (v != null) }
{ "no-fetch", "Create the new TFS remote but don't fetch any changesets", v => NoFetch = (v != null) }
};
}
}
Expand Down Expand Up @@ -108,7 +108,7 @@ public int Run(string tfsBranchPath, string gitBranchNameExpected)
if (!NoFetch)
FetchRemote(tfsRemote, false, !DontCreateGitBranch);
else
Trace.WriteLine("Not fetching changesets, --nofetch option specified");
Trace.WriteLine("Not fetching changesets, --no-fetch option specified");
return GitTfsExitCodes.OK;
}

Expand All @@ -127,7 +127,7 @@ public int Run()
_stdout.WriteLine("WARNING: This command is obsolete and will be removed in the next version. Use 'branch --init' instead!");

if (CloneAllBranches && NoFetch)
throw new GitTfsException("error: --nofetch cannot be used with --all");
throw new GitTfsException("error: --no-fetch cannot be used with --all");

if (!CloneAllBranches)
{
Expand Down
2 changes: 1 addition & 1 deletion GitTfsTest/Commands/InitBranchTest.cs
Expand Up @@ -360,7 +360,7 @@ public void ShouldFailInitAllBranchesBecauseNoFetchWasSpecified()
mocks.ClassUnderTest.NoFetch = true;

var ex = Assert.Throws(typeof(GitTfsException), () => mocks.ClassUnderTest.Run());
Assert.Equal("error: --nofetch cannot be used with --all", ex.Message);
Assert.Equal("error: --no-fetch cannot be used with --all", ex.Message);
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions doc/commands/branch.md
Expand Up @@ -43,7 +43,7 @@ The `branch` command permit to manage TFS branches. With this command, you can d
--init Initialize an existing TFS branch
--ignore-regex=VALUE a regex of files to ignore
--except-regex=VALUE a regex of exceptions to ignore-regex
--nofetch Don't fetch changeset for inited branch(es)
--no-fetch Don't fetch changeset for inited branch(es)
-b, --tfs-parent-branch=VALUE
TFS Parent branch of the TFS branch to clone
(TFS 2008 only! And required!!) ex:
Expand Down Expand Up @@ -130,7 +130,7 @@ You could use the parameter `--except-regex`, to add an exception to the paramet

### Init a branch without fetching changesets

You could use the parameter `--nofetch`, to init the branch by creating its remote but without fetching the changesets of the branch.
You could use the parameter `--no-fetch`, to init the branch by creating its remote but without fetching the changesets of the branch.

### Authentication

Expand Down

0 comments on commit 34969bd

Please sign in to comment.