]> git.ipfire.org Git - thirdparty/git.git/commitdiff
split-index: rename 'new' variables
authorBrandon Williams <bmwill@google.com>
Wed, 14 Feb 2018 18:59:48 +0000 (10:59 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Feb 2018 18:08:05 +0000 (10:08 -0800)
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
split-index.c
split-index.h

index 83e39ec8d7739816188ba909a4cb9da302d48f73..7be5f748a6097ae3b3d8623ccfb42c9b4766ef9c 100644 (file)
@@ -303,17 +303,17 @@ void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce
 }
 
 void replace_index_entry_in_base(struct index_state *istate,
-                                struct cache_entry *old,
-                                struct cache_entry *new)
+                                struct cache_entry *old_entry,
+                                struct cache_entry *new_entry)
 {
-       if (old->index &&
+       if (old_entry->index &&
            istate->split_index &&
            istate->split_index->base &&
-           old->index <= istate->split_index->base->cache_nr) {
-               new->index = old->index;
-               if (old != istate->split_index->base->cache[new->index - 1])
-                       free(istate->split_index->base->cache[new->index - 1]);
-               istate->split_index->base->cache[new->index - 1] = new;
+           old_entry->index <= istate->split_index->base->cache_nr) {
+               new_entry->index = old_entry->index;
+               if (old_entry != istate->split_index->base->cache[new_entry->index - 1])
+                       free(istate->split_index->base->cache[new_entry->index - 1]);
+               istate->split_index->base->cache[new_entry->index - 1] = new_entry;
        }
 }
 
index df91c1bda8117fe7d0f25a0aaedce79370801ce0..43d66826eb712b9a9b6872458527266bd9818146 100644 (file)
@@ -21,7 +21,7 @@ struct split_index *init_split_index(struct index_state *istate);
 void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce);
 void replace_index_entry_in_base(struct index_state *istate,
                                 struct cache_entry *old,
-                                struct cache_entry *new);
+                                struct cache_entry *new_entry);
 int read_link_extension(struct index_state *istate,
                        const void *data, unsigned long sz);
 int write_link_extension(struct strbuf *sb,