private void UpdateStatus()
        {
            try
            {
                var repositoryStatus = _repository.RetrieveStatus();

                Working = new ChangedItemsCollection
                {
                    Added    = GetCollection(repositoryStatus.Untracked),
                    Modified = GetCollection(repositoryStatus.Modified, repositoryStatus.RenamedInWorkDir),
                    Deleted  = GetCollection(repositoryStatus.Missing)
                };

                Index = new ChangedItemsCollection
                {
                    Added    = GetCollection(repositoryStatus.Added),
                    Modified = GetCollection(repositoryStatus.Staged, repositoryStatus.RenamedInIndex),
                    Deleted  = GetCollection(repositoryStatus.Removed)
                };
            }
            catch (LibGit2SharpException e)
            {
                _log.Error(e, "Unexpected git exception");
            }
            catch (Exception e)
            {
                _log.Error(e, "Unexpected exception");
            }
        }
 public ChangedItemsCollection UpdateItemPaths(ChangedItemsCollection items, ICurrentWorkingDirectory cwd)
 {
     return new ChangedItemsCollection
     {
         Added = UpdatePaths(items.Added, cwd),
         Deleted = UpdatePaths(items.Deleted, cwd),
         Modified = UpdatePaths(items.Modified, cwd),
         Unmerged = UpdatePaths(items.Unmerged, cwd),
     };
 }
 public ChangedItemsCollection UpdateItemPaths(ChangedItemsCollection items, ICurrentWorkingDirectory cwd)
 {
     return(new ChangedItemsCollection
     {
         Added = UpdatePaths(items.Added, cwd),
         Deleted = UpdatePaths(items.Deleted, cwd),
         Modified = UpdatePaths(items.Modified, cwd),
         Unmerged = UpdatePaths(items.Unmerged, cwd),
     });
 }
        public UpdateableRepositoryStatus(string folder, ILogger log, Func <string, IRepository> repositoryFactory,
                                          Func <string, IFolderWatcher> folderWatcherFactory, ICurrentWorkingDirectory cwd)
        {
            _log = log;
            _cwd = cwd;

            Working = new ChangedItemsCollection();
            Index   = new ChangedItemsCollection();

            Task.Run(() => Initialize(folder, repositoryFactory, folderWatcherFactory));
        }