Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-26 00:37:08 +0400
committerJunio C Hamano <gitster@pobox.com>2008-05-26 00:37:08 +0400
commit7e83003029ed488253f6173b047a9c77933c8561 (patch)
tree191fd7e272b6adde953d76b974a3ed9de282b128 /read-cache.c
parent58dd4915ba1a933af0087e351743e31b2f9be878 (diff)
parent6848d58c60b7af365ce54cf3e3b274a2f9da2e7e (diff)
Merge branch 'js/ignore-submodule'
* js/ignore-submodule: Ignore dirty submodule states during rebase and stash Teach update-index about --ignore-submodules diff options: Introduce --ignore-submodules
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index 8b467f8f41..bc039819ee 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -942,6 +942,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
int allow_unmerged = (flags & REFRESH_UNMERGED) != 0;
int quiet = (flags & REFRESH_QUIET) != 0;
int not_new = (flags & REFRESH_IGNORE_MISSING) != 0;
+ int ignore_submodules = (flags & REFRESH_IGNORE_SUBMODULES) != 0;
unsigned int options = really ? CE_MATCH_IGNORE_VALID : 0;
for (i = 0; i < istate->cache_nr; i++) {
@@ -949,6 +950,9 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
int cache_errno = 0;
ce = istate->cache[i];
+ if (ignore_submodules && S_ISGITLINK(ce->ce_mode))
+ continue;
+
if (ce_stage(ce)) {
while ((i < istate->cache_nr) &&
! strcmp(istate->cache[i]->name, ce->name))