summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-23 20:55:16 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-23 20:55:21 -0700
commit30ea575876f61c38c59cd578afd8e8789857094b (patch)
tree581da17bd126cf8f6dc45325a80551c4818622ab /builtin/apply.c
parent6da9ded763b69685149c2f9a752e2005261bf0c3 (diff)
parentb60e188c51242b72061b5f2f0d4df80397f6125a (diff)
downloadgit-30ea575876f61c38c59cd578afd8e8789857094b.tar.gz
Merge branch 'tg/ce-namelen-field'
Split lower bits of ce_flags field and creates a new ce_namelen field in the in-core index structure. * tg/ce-namelen-field: Strip namelen out of ce_flags into a ce_namelen field
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 069cf341b6..d453c83378 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3769,7 +3769,8 @@ static void add_index_file(const char *path, unsigned mode, void *buf, unsigned
ce = xcalloc(1, ce_size);
memcpy(ce->name, path, namelen);
ce->ce_mode = create_ce_mode(mode);
- ce->ce_flags = namelen;
+ ce->ce_flags = create_ce_flags(0);
+ ce->ce_namelen = namelen;
if (S_ISGITLINK(mode)) {
const char *s = buf;
@@ -3890,7 +3891,8 @@ static void add_conflicted_stages_file(struct patch *patch)
ce = xcalloc(1, ce_size);
memcpy(ce->name, patch->new_name, namelen);
ce->ce_mode = create_ce_mode(mode);
- ce->ce_flags = create_ce_flags(namelen, stage);
+ ce->ce_flags = create_ce_flags(stage);
+ ce->ce_namelen = namelen;
hashcpy(ce->sha1, patch->threeway_stage[stage - 1]);
if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD) < 0)
die(_("unable to add cache entry for %s"), patch->new_name);