X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=read-cache.c;h=f1f789b7b87643245f1772d15b3f1cb321af324c;hb=b0ad24be8ca9acd86393ce099d3217872d838915;hp=79938bf09a7e5c12de90af4cd81be0fdf755113a;hpb=80eac928ae11d4e417feddcc6a1ec373cf41e14f;p=git.git diff --git a/read-cache.c b/read-cache.c index 79938bf09..f1f789b7b 100644 --- a/read-cache.c +++ b/read-cache.c @@ -26,7 +26,7 @@ static struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int reall #define CACHE_EXT(s) ( (s[0]<<24)|(s[1]<<16)|(s[2]<<8)|(s[3]) ) #define CACHE_EXT_TREE 0x54524545 /* "TREE" */ -#define CACHE_EXT_RESOLVE_UNDO 0x52455543 /* "REUN" */ +#define CACHE_EXT_RESOLVE_UNDO 0x52455543 /* "REUC" */ struct index_state the_index; @@ -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; } }