GitSharp.Core.Transport.WalkFetchConnection.ExpandOneAlternate C# (CSharp) Method

ExpandOneAlternate() private method

private ExpandOneAlternate ( AnyObjectId id, ProgressMonitor pm ) : List
id AnyObjectId
pm ProgressMonitor
return List
        private List<WalkRemoteObjectDatabase> ExpandOneAlternate(AnyObjectId id, ProgressMonitor pm)
        {
            while (_noAlternatesYet.Count > 0)
            {
                WalkRemoteObjectDatabase wrr = _noAlternatesYet.First.Value;
                _noAlternatesYet.RemoveFirst();
                try
                {
                    pm.BeginTask("Listing alternates", ProgressMonitor.UNKNOWN);
                    List<WalkRemoteObjectDatabase> altList = wrr.getAlternates();
                    if (altList != null && altList.Count > 0)
                        return altList;
                }
                catch (IOException e)
                {
                    RecordError(id, e);
                }
                finally
                {
                    pm.EndTask();
                }
            }
            return null;
        }