diff --git a/unpack-trees.c b/unpack-trees.c
index 6847c2d966c5e1d0299b21682d6fef2637329071..aaacaf1015ccf1f353151982a3018ad349663d76 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
{
if (has_symlink_or_noent_leading_path(ce->name, ce_namelen(ce)))
return;
{
if (has_symlink_or_noent_leading_path(ce->name, ce_namelen(ce)))
return;
- if (unlink(ce->name))
+ if (unlink_or_warn(ce->name))
return;
schedule_dir_for_removal(ce->name, ce_namelen(ce));
}
return;
schedule_dir_for_removal(ce->name, ce_namelen(ce));
}
cnt = 0;
}
cnt = 0;
}
- git_attr_set_direction(GIT_ATTR_CHECKOUT, &o->result);
+ if (o->update)
+ git_attr_set_direction(GIT_ATTR_CHECKOUT, &o->result);
for (i = 0; i < index->cache_nr; i++) {
struct cache_entry *ce = index->cache[i];
for (i = 0; i < index->cache_nr; i++) {
struct cache_entry *ce = index->cache[i];
}
}
stop_progress(&progress);
}
}
stop_progress(&progress);
- git_attr_set_direction(GIT_ATTR_CHECKIN, NULL);
+ if (o->update)
+ git_attr_set_direction(GIT_ATTR_CHECKIN, NULL);
return errs != 0;
}
return errs != 0;
}