diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-11 16:46:20 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-11 16:46:20 -0800 |
commit | e0197c9aae39b0f1ba6c21d1f6d0bae5de03a44d (patch) | |
tree | 8ce3be12cc0fba866845b18e977c264fbcf54792 /builtin-apply.c | |
parent | 3960a951795819e6cd09422e15092b45cdd46f73 (diff) | |
parent | 9cb76b8cdc8ac62a77080595f6443613fd64bab3 (diff) | |
download | git-e0197c9aae39b0f1ba6c21d1f6d0bae5de03a44d.tar.gz git-e0197c9aae39b0f1ba6c21d1f6d0bae5de03a44d.tar.xz |
Merge branch 'lt/in-core-index'
* lt/in-core-index:
lazy index hashing
Create pathname-based hash-table lookup into index
read-cache.c: introduce is_racy_timestamp() helper
read-cache.c: fix a couple more CE_REMOVE conversion
Also use unpack_trees() in do_diff_cache()
Make run_diff_index() use unpack_trees(), not read_tree()
Avoid running lstat(2) on the same cache entry.
index: be careful when handling long names
Make on-disk index representation separate from in-core one
Diffstat (limited to 'builtin-apply.c')
-rw-r--r-- | builtin-apply.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin-apply.c b/builtin-apply.c index a11b1bbee..46dad5b2a 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -1946,7 +1946,7 @@ static int read_file_or_gitlink(struct cache_entry *ce, struct strbuf *buf) if (!ce) return 0; - if (S_ISGITLINK(ntohl(ce->ce_mode))) { + if (S_ISGITLINK(ce->ce_mode)) { strbuf_grow(buf, 100); strbuf_addf(buf, "Subproject commit %s\n", sha1_to_hex(ce->sha1)); } else { @@ -2023,7 +2023,7 @@ static int check_to_create_blob(const char *new_name, int ok_if_exists) static int verify_index_match(struct cache_entry *ce, struct stat *st) { - if (S_ISGITLINK(ntohl(ce->ce_mode))) { + if (S_ISGITLINK(ce->ce_mode)) { if (!S_ISDIR(st->st_mode)) return -1; return 0; @@ -2082,12 +2082,12 @@ static int check_patch(struct patch *patch, struct patch *prev_patch) return error("%s: does not match index", old_name); if (cached) - st_mode = ntohl(ce->ce_mode); + st_mode = ce->ce_mode; } else if (stat_ret < 0) return error("%s: %s", old_name, strerror(errno)); if (!cached) - st_mode = ntohl(ce_mode_from_stat(ce, st.st_mode)); + st_mode = ce_mode_from_stat(ce, st.st_mode); if (patch->is_new < 0) patch->is_new = 0; @@ -2388,7 +2388,7 @@ 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 = htons(namelen); + ce->ce_flags = namelen; if (S_ISGITLINK(mode)) { const char *s = buf; |