Skip to content
Snippets Groups Projects
Commit d6cc1360 authored by Junio C Hamano's avatar Junio C Hamano
Browse files

Merge branch 'nd/fetch-compact-update'

"git fetch" output cleanup.

* nd/fetch-compact-update:
  fetch: prefer suffix substitution in compact fetch.output
parents 5db56270 dc40b24d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -629,9 +629,14 @@ static int find_and_replace(struct strbuf *haystack,
const char *needle,
const char *placeholder)
{
const char *p = strstr(haystack->buf, needle);
const char *p = NULL;
int plen, nlen;
 
nlen = strlen(needle);
if (ends_with(haystack->buf, needle))
p = haystack->buf + haystack->len - nlen;
else
p = strstr(haystack->buf, needle);
if (!p)
return 0;
 
Loading
Loading
@@ -639,7 +644,6 @@ static int find_and_replace(struct strbuf *haystack,
return 0;
 
plen = strlen(p);
nlen = strlen(needle);
if (plen > nlen && p[nlen] != '/')
return 0;
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment