diff options
| author | Junio C Hamano <gitster@pobox.com> | 2010-01-26 22:53:13 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2010-01-26 22:53:13 -0800 |
| commit | d539de9f25920f099e4e56b0acbb4ebf246ff0f4 (patch) | |
| tree | 8453048a2a8f5a8a84d66e5c8dfd4784bdec49b6 /read-cache.c | |
| parent | 3fa7c3da379bb47a0e7a52ffc13cb366add880a2 (diff) | |
| parent | 721ceec1ad12625e90b395fd0be0fae9049ebc22 (diff) | |
| download | git-d539de9f25920f099e4e56b0acbb4ebf246ff0f4.tar.xz | |
Merge branch 'jl/diff-submodule-ignore'
* jl/diff-submodule-ignore:
Teach diff --submodule that modified submodule directory is dirty
git diff: Don't test submodule dirtiness with --ignore-submodules
Make ce_uptodate() trustworthy again
Diffstat (limited to 'read-cache.c')
| -rw-r--r-- | read-cache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index 79938bf09a..309b77a6c9 100644 --- a/read-cache.c +++ b/read-cache.c @@ -612,7 +612,8 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st, if (alias && !ce_stage(alias) && !ie_match_stat(istate, alias, st, ce_option)) { /* Nothing changed, really */ free(ce); - ce_mark_uptodate(alias); + if (!S_ISGITLINK(alias->ce_mode)) + ce_mark_uptodate(alias); alias->ce_flags |= CE_ADDED; return 0; } @@ -1050,7 +1051,8 @@ static struct cache_entry *refresh_cache_ent(struct index_state *istate, * because CE_UPTODATE flag is in-core only; * we are not going to write this change out. */ - ce_mark_uptodate(ce); + if (!S_ISGITLINK(ce->ce_mode)) + ce_mark_uptodate(ce); return ce; } } |
