Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

receive.denyCurrentBranch: respect all worktrees #331

Copy link
Copy link
@dscho

Description

@dscho
Issue body actions

Currently, the receive.denyCurrentBranch config setting determines what Git should do when pushing a branch into a non-bare repository when said branch is checked out.

However, this setting was forgotten when the git worktree command was introduced: only the main worktree's current branch is respected.

For interested first contributors: use git grep -i receive.denycurrentbranch and follow the trail to find the code locations where that config setting modifies behavior. Then look for the code that prevents branches to be checked out in a worktree when they are already checked out in another worktree (git grep "is already checked out at" will lead you there). Then imitate that, to address this issue. (And throw in a test case or two, imitating the test cases in t/ that already test that config setting.)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.