Skip to content

Commit

Permalink
fetch: fix extensions.partialclone name in error message
Browse files Browse the repository at this point in the history
There is "extensions.partialclone" and "core.partialCloneFilter", but
not "core.partialclone". Only "extensions.partialclone" is meant to
contain a remote name.

While at it, let's wrap the relevant code lines to keep them at a
reasonable length.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
chriscool authored and gitster committed Jan 14, 2019
1 parent 268fbcd commit e013787
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builtin/fetch.c
Expand Up @@ -1332,7 +1332,8 @@ static inline void fetch_one_setup_partial(struct remote *remote)
*/
if (strcmp(remote->name, repository_format_partial_clone)) {
if (filter_options.choice)
die(_("--filter can only be used with the remote configured in core.partialClone"));
die(_("--filter can only be used with the remote "
"configured in extensions.partialclone"));
return;
}

Expand Down Expand Up @@ -1500,7 +1501,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
result = fetch_one(remote, argc, argv, prune_tags_ok);
} else {
if (filter_options.choice)
die(_("--filter can only be used with the remote configured in core.partialClone"));
die(_("--filter can only be used with the remote "
"configured in extensions.partialclone"));
/* TODO should this also die if we have a previous partial-clone? */
result = fetch_multiple(&list);
}
Expand Down

0 comments on commit e013787

Please sign in to comment.