#include "submodule.h"
#include "submodule-config.h"
#include "fsmonitor.h"
+#include "object-store.h"
#include "fetch-object.h"
/*
ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE);
}
-static struct cache_entry *dup_entry(const struct cache_entry *ce, struct index_state *istate)
-{
- unsigned int size = ce_size(ce);
- struct cache_entry *new_entry = make_empty_cache_entry(istate, ce_namelen(ce));
-
- memcpy(new_entry, ce, size);
- return new_entry;
-}
-
static void add_entry(struct unpack_trees_options *o,
const struct cache_entry *ce,
unsigned int set, unsigned int clear)
{
- do_add_entry(o, dup_entry(ce, &o->result), set, clear);
+ do_add_entry(o, dup_cache_entry(ce, &o->result), set, clear);
}
/*
if (select_flag && !(ce->ce_flags & select_flag))
continue;
- if (!ce_stage(ce))
+ if (!ce_stage(ce) && !(ce->ce_flags & CE_CONFLICTED))
ce->ce_flags |= skip_wt_flag;
else
ce->ce_flags &= ~skip_wt_flag;
struct unpack_trees_options *o)
{
int update = CE_UPDATE;
- struct cache_entry *merge = dup_entry(ce, &o->result);
+ struct cache_entry *merge = dup_cache_entry(ce, &o->result);
if (!old) {
/*