summaryrefslogtreecommitdiff
path: root/update-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-15 21:45:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-15 21:45:38 -0700
commitf5cabd13d814bb5c547a13af03bcc42122531141 (patch)
tree6795adc096e36c7a7f8e6a407297727e61d4d083 /update-cache.c
parent13e897e58072678cdae3ec1db51cc91110dc559d (diff)
downloadgit-f5cabd13d814bb5c547a13af03bcc42122531141.tar.gz
Encode a few extra flags per index entry.
This will allow us to have the same name in different "states" in the index at the same time. Which in turn seems to be a very simple way to merge.
Diffstat (limited to 'update-cache.c')
-rw-r--r--update-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/update-cache.c b/update-cache.c
index 065705a9b4..134ba74398 100644
--- a/update-cache.c
+++ b/update-cache.c
@@ -107,7 +107,7 @@ static int add_file_to_cache(char *path)
memcpy(ce->name, path, namelen);
fill_stat_cache_info(ce, &st);
ce->ce_mode = htonl(st.st_mode);
- ce->ce_namelen = htons(namelen);
+ ce->ce_flags = htons(namelen);
if (index_fd(path, namelen, ce, fd, &st) < 0)
return -1;
@@ -259,7 +259,7 @@ static int add_cacheinfo(char *arg1, char *arg2, char *arg3)
memcpy(ce->sha1, sha1, 20);
memcpy(ce->name, arg3, len);
- ce->ce_namelen = htons(len);
+ ce->ce_flags = htons(len);
ce->ce_mode = htonl(mode);
return add_cache_entry(ce, allow_add);
}