GitCommands.GitModule.GetSubmoduleItemsForEachRef C# (CSharp) Method

GetSubmoduleItemsForEachRef() public method

public GetSubmoduleItemsForEachRef ( string filename, bool>.Func showRemoteRef ) : IGitItem>.Dictionary
filename string
showRemoteRef bool>.Func
return IGitItem>.Dictionary
        public Dictionary<IGitRef, IGitItem> GetSubmoduleItemsForEachRef(string filename, Func<IGitRef, bool> showRemoteRef)
        {
            string command = GetSortedRefsCommand();

            if (command == null)
                return new Dictionary<IGitRef, IGitItem>();

            filename = filename.ToPosixPath();

            var tree = RunGitCmd(command, SystemEncoding);

            var refs = GetTreeRefs(tree);

            return refs.Where(showRemoteRef).ToDictionary(r => r, r => GetSubmoduleCommitHash(filename, r.Name));
        }
GitModule