Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
submodule.c: use the right index instead of the_index
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Mon, 13 Aug 2018 16:14:31 +0000
(18:14 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Aug 2018 21:14:43 +0000
(14:14 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
d17ef3a
)
diff --git
a/submodule.c
b/submodule.c
index 293efc2a2f5130bd86b5546398d3a22630b6f311..50cbf5f13ed84c5da081b4130bbd50b7b97e3121 100644
(file)
--- a/
submodule.c
+++ b/
submodule.c
@@
-93,7
+93,7
@@
int update_path_in_gitmodules(const char *oldpath, const char *newpath)
if (!file_exists(GITMODULES_FILE)) /* Do nothing without .gitmodules */
return -1;
if (!file_exists(GITMODULES_FILE)) /* Do nothing without .gitmodules */
return -1;
- if (is_gitmodules_unmerged(
&the_
index))
+ if (is_gitmodules_unmerged(
the_repository->
index))
die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
submodule = submodule_from_path(the_repository, &null_oid, oldpath);
die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
submodule = submodule_from_path(the_repository, &null_oid, oldpath);
@@
-127,7
+127,7
@@
int remove_path_from_gitmodules(const char *path)
if (!file_exists(GITMODULES_FILE)) /* Do nothing without .gitmodules */
return -1;
if (!file_exists(GITMODULES_FILE)) /* Do nothing without .gitmodules */
return -1;
- if (is_gitmodules_unmerged(
&the_
index))
+ if (is_gitmodules_unmerged(
the_repository->
index))
die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
submodule = submodule_from_path(the_repository, &null_oid, path);
die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
submodule = submodule_from_path(the_repository, &null_oid, path);
@@
-188,7
+188,7
@@
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
if (ignore)
handle_ignore_submodules_arg(diffopt, ignore);
if (ignore)
handle_ignore_submodules_arg(diffopt, ignore);
- else if (is_gitmodules_unmerged(
&the_
index))
+ else if (is_gitmodules_unmerged(
the_repository->
index))
diffopt->flags.ignore_submodules = 1;
}
}
diffopt->flags.ignore_submodules = 1;
}
}
@@
-258,7
+258,7
@@
int is_submodule_active(struct repository *repo, const char *path)
}
parse_pathspec(&ps, 0, 0, NULL, args.argv);
}
parse_pathspec(&ps, 0, 0, NULL, args.argv);
- ret = match_pathspec(
&the_
index, &ps, path, strlen(path), 0, NULL, 1);
+ ret = match_pathspec(
repo->
index, &ps, path, strlen(path), 0, NULL, 1);
argv_array_clear(&args);
clear_pathspec(&ps);
argv_array_clear(&args);
clear_pathspec(&ps);