Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature] Support extensions.worktreeconfig for repositoryformatversion=1 #6044

Closed
@Whirlwind

Description

@Whirlwind
$ git clone --filter=blob:none git@xxx:xx/xx.git
$ cd xx
$ git worktree add ../worktree
$ cd ../worktree
$ git config extensions.worktreeConfig true

I have a origin repository with --filter=blob:none, and a worktree repository. Then I enable the worktree config in the worktree.

In the libgit2, it could not support the worktree config with filter:

unsupported extension name extensions.worktreeconfig

I check the libgit2:

static int check_valid_extension(const git_config_entry *entry, void *payload)
{
	GIT_UNUSED(payload);

	if (!strcmp(entry->name, "extensions.noop"))
		return 0;

	git_error_set(GIT_ERROR_REPOSITORY, "unsupported extension name %s", entry->name);
	return -1;
}

static int check_extensions(git_config *config, int version)
{
	if (version < 1)
		return 0;

	return git_config_foreach_match(config, "^extensions\\.", check_valid_extension, NULL);
}

And I check the version: repositoryformatversion = 1, So all extension configs will failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions