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,6 +1,7 @@
|
||||
/*
|
||||
* "git push"
|
||||
*/
|
||||
#define USE_THE_REPOSITORY_VARIABLE
|
||||
#include "builtin.h"
|
||||
#include "advice.h"
|
||||
#include "branch.h"
|
||||
@ -13,7 +14,6 @@
|
||||
#include "transport.h"
|
||||
#include "parse-options.h"
|
||||
#include "pkt-line.h"
|
||||
#include "repository.h"
|
||||
#include "submodule.h"
|
||||
#include "submodule-config.h"
|
||||
#include "send-pack.h"
|
||||
@ -548,7 +548,10 @@ static int git_push_config(const char *k, const char *v,
|
||||
return git_default_config(k, v, ctx, NULL);
|
||||
}
|
||||
|
||||
int cmd_push(int argc, const char **argv, const char *prefix)
|
||||
int cmd_push(int argc,
|
||||
const char **argv,
|
||||
const char *prefix,
|
||||
struct repository *repository UNUSED)
|
||||
{
|
||||
int flags = 0;
|
||||
int tags = 0;
|
||||
|
Reference in New Issue
Block a user