summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-25 20:37:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-05-25 20:37:08 (GMT)
commit7e83003029ed488253f6173b047a9c77933c8561 (patch)
tree191fd7e272b6adde953d76b974a3ed9de282b128 /read-cache.c
parent58dd4915ba1a933af0087e351743e31b2f9be878 (diff)
parent6848d58c60b7af365ce54cf3e3b274a2f9da2e7e (diff)
downloadgit-7e83003029ed488253f6173b047a9c77933c8561.zip
git-7e83003029ed488253f6173b047a9c77933c8561.tar.gz
git-7e83003029ed488253f6173b047a9c77933c8561.tar.bz2
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 8b467f8..bc03981 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))