Skip to content

Commit 78e8208

Browse files
authored
[config] Return first writeable backend that isn't worktree by default
1 parent 76590f4 commit 78e8208

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libgit2/config.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ static int get_backend_for_use(git_config_backend **out,
621621
if (backend->level == GIT_CONFIG_LEVEL_WORKTREE) {
622622
continue;
623623
}
624+
625+
/* The original behavior was to return the first writeable backend found. */
626+
return 0;
624627
}
625628
}
626629

0 commit comments

Comments
 (0)