src/SyncTool.Git/test/RepositoryAccess/Transactions/AbstractGitTransactionTest.cs
/// <summary>
/// Adds the specified file to the specified branch using the path of the transaction's local repository
/// </summary>
Adds the specified file to the specified branch using the path of the transaction's local repository
Adds the specified file to the specified branch using the path of the transaction ' s local repository
protected void AddFile(IGitTransaction transaction, string branchName, string fileName)
        {
            using (var workingDirectory = new TemporaryWorkingDirectory(null, transaction.LocalPath, branchName))
            {
                var path = Path.Combine(workingDirectory.Location, fileName);
                File.WriteAllText(path, "Some file content");
                workingDirectory.Commit();
                workingDirectory.Push();                
            }
        }
protected void AddFile ( IGitTransaction transaction , string branchName , string fileName ) { using ( var workingDirectory = new TemporaryWorkingDirectory ( null , transaction . LocalPath , branchName ) ) { var path = Path . Combine ( workingDirectory . Location , fileName ) ; File . WriteAllText ( path , " " ) ; workingDirectory . Commit ( ) ; workingDirectory . Push ( ) ; } }
Adds the specified file to the specified branch using the path of the transaction's local repository
Adds the specified file to the specified branch using the path of the transaction ' s local repository
transaction
IGitTransaction
branchName
string
fileName
string