mono / ngit

Automated jgit port to c#
261 stars 152 forks source link

IsClean() #67

Closed gbibek closed 10 years ago

gbibek commented 10 years ago

I am trying to use IsClean() to determine if the remote repository has changed or not but when I try to use IsClean() it always return true when I change the remote repo (when I change file in local repo it returns false, that means it works for this case). Is there any problem with this particular function or am I missing something.

       var repository = Git.Open(C:\git);

        while (repository.Status().Call().IsClean())
        {
            repository.Pull().Call(); // this function change the repo status
            Console.WriteLine("Is clean");
        }
gbibek commented 10 years ago

I got the answer to this from stackoverflow -- http://stackoverflow.com/questions/22839031/what-is-the-method-in-ngit-to-see-if-remote-repo-changed