Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'LibGit2Sharp/SubmoduleCollection.cs')
-rw-r--r--LibGit2Sharp/SubmoduleCollection.cs39
1 files changed, 19 insertions, 20 deletions
diff --git a/LibGit2Sharp/SubmoduleCollection.cs b/LibGit2Sharp/SubmoduleCollection.cs
index 4c9a61fe..bc7aa470 100644
--- a/LibGit2Sharp/SubmoduleCollection.cs
+++ b/LibGit2Sharp/SubmoduleCollection.cs
@@ -41,10 +41,9 @@ namespace LibGit2Sharp
{
Ensure.ArgumentNotNullOrEmptyString(name, "name");
- return Lookup(name, handle =>
- new Submodule(repo, name,
- Proxy.git_submodule_path(handle),
- Proxy.git_submodule_url(handle)));
+ return Lookup(name, handle => new Submodule(repo, name,
+ Proxy.git_submodule_path(handle),
+ Proxy.git_submodule_url(handle)));
}
}
@@ -63,9 +62,9 @@ namespace LibGit2Sharp
{
if (handle == null)
{
- throw new NotFoundException(string.Format(
- CultureInfo.InvariantCulture,
- "Submodule lookup failed for '{0}'.", name));
+ throw new NotFoundException(string.Format(CultureInfo.InvariantCulture,
+ "Submodule lookup failed for '{0}'.",
+ name));
}
Proxy.git_submodule_init(handle, overwrite);
@@ -91,9 +90,9 @@ namespace LibGit2Sharp
{
if (handle == null)
{
- throw new NotFoundException(string.Format(
- CultureInfo.InvariantCulture,
- "Submodule lookup failed for '{0}'.", name));
+ throw new NotFoundException(string.Format(CultureInfo.InvariantCulture,
+ "Submodule lookup failed for '{0}'.",
+ name));
}
using (GitCheckoutOptsWrapper checkoutOptionsWrapper = new GitCheckoutOptsWrapper(options))
@@ -138,14 +137,15 @@ namespace LibGit2Sharp
internal bool TryStage(string relativePath, bool writeIndex)
{
- return Lookup(relativePath, handle =>
- {
- if (handle == null)
- return false;
-
- Proxy.git_submodule_add_to_index(handle, writeIndex);
- return true;
- });
+ return Lookup(relativePath,
+ handle =>
+ {
+ if (handle == null)
+ return false;
+
+ Proxy.git_submodule_add_to_index(handle, writeIndex);
+ return true;
+ });
}
internal T Lookup<T>(string name, Func<SubmoduleSafeHandle, T> selector, bool throwIfNotFound = false)
@@ -171,8 +171,7 @@ namespace LibGit2Sharp
{
get
{
- return string.Format(CultureInfo.InvariantCulture,
- "Count = {0}", this.Count());
+ return string.Format(CultureInfo.InvariantCulture, "Count = {0}", this.Count());
}
}
}