Class GitRepositoryNavigation
This static class presently exposes a single method that discovers the name of the root directory of the Git repository that contains the current working directory or the directory specified by the caller.
Inheritance
Inherited Members
Namespace: WizardWrx.Core
Assembly: WizardWrx.Core.dll
Syntax
public class GitRepositoryNavigation
Methods
| Improve this Doc View SourceDiscoverRepoRoot(String)
Call this method to discover the name of the root directory of the Git repository that contains the current working directory or the directory specified by the caller.
Declaration
public static string DiscoverRepoRoot(string pstrStartDirectoryName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | pstrStartDirectoryName | This optional string identifies the directory from which to start the search. If null, the starting point is either the value of the WWREBASEPATHS_REPOROOT environment variable or the current working directory. |
Returns
| Type | Description |
|---|---|
| System.String | If it succeeds, the returnd string represents the name of the root directory of the current Git repository. Otherwise, the method raises an InvalidOperationException. |
Remarks
This method wraps the internal shared implementation and provides localized error messages using this assembly’s resource set.
If the repository root cannot be determined, this method throws an
System.InvalidOperationException whose message is formatted using
Properties.Resources.IDS_REPOSITORY_ROOT_NOT_FOUND.