projects
/
platform
/
upstream
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
packaging: Add contrib installation
[platform/upstream/git.git]
/
merge.c
diff --git
a/merge.c
b/merge.c
index
aa36de2
..
5fb88af
100644
(file)
--- a/
merge.c
+++ b/
merge.c
@@
-19,22
+19,22
@@
int try_merge_command(struct repository *r,
const char **xopts, struct commit_list *common,
const char *head_arg, struct commit_list *remotes)
{
const char **xopts, struct commit_list *common,
const char *head_arg, struct commit_list *remotes)
{
- struct
argv_array args = ARGV_ARRAY
_INIT;
+ struct
strvec args = STRVEC
_INIT;
int i, ret;
struct commit_list *j;
int i, ret;
struct commit_list *j;
-
argv_array
_pushf(&args, "merge-%s", strategy);
+
strvec
_pushf(&args, "merge-%s", strategy);
for (i = 0; i < xopts_nr; i++)
for (i = 0; i < xopts_nr; i++)
-
argv_array
_pushf(&args, "--%s", xopts[i]);
+
strvec
_pushf(&args, "--%s", xopts[i]);
for (j = common; j; j = j->next)
for (j = common; j; j = j->next)
-
argv_array
_push(&args, merge_argument(j->item));
-
argv_array
_push(&args, "--");
-
argv_array
_push(&args, head_arg);
+
strvec
_push(&args, merge_argument(j->item));
+
strvec
_push(&args, "--");
+
strvec
_push(&args, head_arg);
for (j = remotes; j; j = j->next)
for (j = remotes; j; j = j->next)
-
argv_array
_push(&args, merge_argument(j->item));
+
strvec
_push(&args, merge_argument(j->item));
- ret = run_command_v_opt(args.
arg
v, RUN_GIT_CMD);
-
argv_array
_clear(&args);
+ ret = run_command_v_opt(args.v, RUN_GIT_CMD);
+
strvec
_clear(&args);
discard_index(r->index);
if (repo_read_index(r) < 0)
discard_index(r->index);
if (repo_read_index(r) < 0)
@@
-80,8
+80,8
@@
int checkout_fast_forward(struct repository *r,
}
memset(&opts, 0, sizeof(opts));
}
memset(&opts, 0, sizeof(opts));
+ dir_init(&dir);
if (overwrite_ignore) {
if (overwrite_ignore) {
- memset(&dir, 0, sizeof(dir));
dir.flags |= DIR_SHOW_IGNORED;
setup_standard_excludes(&dir);
opts.dir = &dir;
dir.flags |= DIR_SHOW_IGNORED;
setup_standard_excludes(&dir);
opts.dir = &dir;
@@
-102,6
+102,7
@@
int checkout_fast_forward(struct repository *r,
clear_unpack_trees_porcelain(&opts);
return -1;
}
clear_unpack_trees_porcelain(&opts);
return -1;
}
+ dir_clear(&dir);
clear_unpack_trees_porcelain(&opts);
if (write_locked_index(r->index, &lock_file, COMMIT_LOCK))
clear_unpack_trees_porcelain(&opts);
if (write_locked_index(r->index, &lock_file, COMMIT_LOCK))