private string ToFileFormat() { var sb = new StringBuilder(); sb.Append("[core]"); if (RepositoryFormatVersion != null) { sb.Append("\n repositoryformatversion = ").Append(RepositoryFormatVersion); } if (FileMode != null) { sb.Append("\n filemode = ").Append(FileMode.ToString().ToLower()); } sb.Append("\n bare = ").Append(Bare.ToString().ToLower()); if (LogAllRefUpdates != null) { sb.Append("\n logallrefupdates = ").Append(LogAllRefUpdates.ToString().ToLower()); } foreach (var item in Remotes) { sb.Append("\n[remote \"").Append(item.Key).Append("\"]"); if (item.Value.Url != null) { sb.Append("\n url = ").Append(item.Value.Url); } if (item.Value.Fetch != null) { sb.Append("\n fetch = ").Append(item.Value.Fetch); } } foreach (var item in Branches) { sb.Append("\n[branch \"").Append(item.Key).Append("\"]"); if (item.Value.Remote != null) { sb.Append("\n remote = ").Append(item.Value.Remote); } if (item.Value.Merge != null) { sb.Append("\n merge = ").Append(item.Value.Merge); } } sb.Append("\n"); return(sb.ToString()); }
public override int GetHashCode() { return Bare.GetHashCode(); }