public NoRemoteRepositoryException cleanNotFound(NoRemoteRepositoryException nf) { string why = _errStream.ToString(); if (string.IsNullOrEmpty(why)) { return(nf); } string path = Uri.Path; if (Uri.Scheme != null && Uri.Path.StartsWith("/~")) { path = Uri.Path.Substring(1); } var pfx = new StringBuilder(); pfx.Append("fatal: "); SqAlways(pfx, path); pfx.Append(":"); if (why.StartsWith(pfx.ToString())) { why = why.Substring(pfx.Length); } return(new NoRemoteRepositoryException(Uri, why)); }
internal virtual NoRemoteRepositoryException CleanNotFound(NoRemoteRepositoryException nf, string why) { if (why == null || why.Length == 0) { return(nf); } string path = uri.GetPath(); if (uri.GetScheme() != null && uri.GetPath().StartsWith("/~")) { path = Sharpen.Runtime.Substring(uri.GetPath(), 1); } StringBuilder pfx = new StringBuilder(); pfx.Append("fatal: "); pfx.Append(QuotedString.BOURNE.Quote(path)); pfx.Append(": "); if (why.StartsWith(pfx.ToString())) { why = Sharpen.Runtime.Substring(why, pfx.Length); } return(new NoRemoteRepositoryException(uri, why)); }
internal virtual NoRemoteRepositoryException CleanNotFound(NoRemoteRepositoryException nf, string why) { if (why == null || why.Length == 0) { return nf; } string path = uri.GetPath(); if (uri.GetScheme() != null && uri.GetPath().StartsWith("/~")) { path = Sharpen.Runtime.Substring(uri.GetPath(), 1); } StringBuilder pfx = new StringBuilder(); pfx.Append("fatal: "); pfx.Append(QuotedString.BOURNE.Quote(path)); pfx.Append(": "); if (why.StartsWith(pfx.ToString())) { why = Sharpen.Runtime.Substring(why, pfx.Length); } return new NoRemoteRepositoryException(uri, why); }