Merge branch 'js/reflog-anonymize-for-clone-and-fetch'
The reflog entries for "git clone" and "git fetch" did not anonymize the URL they operated on. * js/reflog-anonymize-for-clone-and-fetch: clone/fetch: anonymize URLs in the reflog
This commit is contained in:
@ -1758,8 +1758,13 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
|
||||
|
||||
/* Record the command line for the reflog */
|
||||
strbuf_addstr(&default_rla, "fetch");
|
||||
for (i = 1; i < argc; i++)
|
||||
strbuf_addf(&default_rla, " %s", argv[i]);
|
||||
for (i = 1; i < argc; i++) {
|
||||
/* This handles non-URLs gracefully */
|
||||
char *anon = transport_anonymize_url(argv[i]);
|
||||
|
||||
strbuf_addf(&default_rla, " %s", anon);
|
||||
free(anon);
|
||||
}
|
||||
|
||||
fetch_config_from_gitmodules(&submodule_fetch_jobs_config,
|
||||
&recurse_submodules);
|
||||
|
Reference in New Issue
Block a user