GitScc.GitRepository.Refresh C# (CSharp) Method

Refresh() public method

public Refresh ( ) : void
return void
        public void Refresh()
        {
            this.repositoryGraph = null;
            this._changedFiles = null;
            this._branchDisplayName = null;
            this.remotes = null;
            this.configs = null;
            _branchInfoList = null;
            SetBranchName();
            LoadHeadState();
        }

Usage Example

Esempio n. 1
0
        public void GetChangedFilesTest()
        {
            GitRepository.Init(tempFolder);
            File.WriteAllLines(tempFilePath, lines);

            GitRepository tracker = new GitRepository(tempFolder);
            tracker.StageFile(tempFile);
            tracker.Refresh();
            Assert.AreEqual(GitFileStatus.Added, tracker.GetFileStatus(tempFile));
            tracker.Commit("中文 1čtestč");
            tracker.Refresh();
            Assert.AreEqual(0, tracker.ChangedFiles.Count());
            File.WriteAllText(tempFilePath, "a");
            tracker.Refresh();
            Assert.AreEqual(GitFileStatus.Modified, tracker.GetFileStatus(tempFile));
        }
All Usage Examples Of GitScc.GitRepository::Refresh