Merge branch 'ep/varscope'
Shrink lifetime of variables by moving their definitions to an inner scope where appropriate. * ep/varscope: builtin/gc.c: reduce scope of variables builtin/fetch.c: reduce scope of variable builtin/commit.c: reduce scope of variables builtin/clean.c: reduce scope of variable builtin/blame.c: reduce scope of variables builtin/apply.c: reduce scope of variables bisect.c: reduce scope of variable
This commit is contained in:
@ -1026,7 +1026,6 @@ static int fetch_multiple(struct string_list *list)
|
||||
|
||||
static int fetch_one(struct remote *remote, int argc, const char **argv)
|
||||
{
|
||||
int i;
|
||||
static const char **refs = NULL;
|
||||
struct refspec *refspec;
|
||||
int ref_nr = 0;
|
||||
@ -1050,6 +1049,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
|
||||
|
||||
if (argc > 0) {
|
||||
int j = 0;
|
||||
int i;
|
||||
refs = xcalloc(argc + 1, sizeof(const char *));
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "tag")) {
|
||||
|
Reference in New Issue
Block a user