Merge branch 'jc/pass-repo-to-builtins'
The convention to calling into built-in command implementation has been updated to pass the repository, if known, together with the prefix value. * jc/pass-repo-to-builtins: add: pass in repo variable instead of global the_repository builtin: remove USE_THE_REPOSITORY for those without the_repository builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h builtin: add a repository parameter for builtin functions
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#define USE_THE_REPOSITORY_VARIABLE
|
||||
#include "builtin.h"
|
||||
#include "abspath.h"
|
||||
#include "advice.h"
|
||||
@ -17,7 +18,6 @@
|
||||
#include "read-cache-ll.h"
|
||||
#include "refs.h"
|
||||
#include "remote.h"
|
||||
#include "repository.h"
|
||||
#include "run-command.h"
|
||||
#include "hook.h"
|
||||
#include "sigchain.h"
|
||||
@ -1392,7 +1392,10 @@ static int repair(int ac, const char **av, const char *prefix)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int cmd_worktree(int ac, const char **av, const char *prefix)
|
||||
int cmd_worktree(int ac,
|
||||
const char **av,
|
||||
const char *prefix,
|
||||
struct repository *repo UNUSED)
|
||||
{
|
||||
parse_opt_subcommand_fn *fn = NULL;
|
||||
struct option options[] = {
|
||||
|
Reference in New Issue
Block a user