Merge branch 'jc/renormalize-merge-kill-safer-crlf'

"git merge" with renormalization did not work well with
merge-recursive, due to "safer crlf" conversion kicking in when it
shouldn't.

* jc/renormalize-merge-kill-safer-crlf:
  merge: avoid "safer crlf" during recording of merge results
  convert: unify the "auto" handling of CRLF
This commit is contained in:
Junio C Hamano
2016-07-25 14:13:38 -07:00
10 changed files with 112 additions and 90 deletions

View File

@ -202,12 +202,21 @@ static int add_cacheinfo(unsigned int mode, const struct object_id *oid,
const char *path, int stage, int refresh, int options)
{
struct cache_entry *ce;
ce = make_cache_entry(mode, oid ? oid->hash : null_sha1, path, stage,
(refresh ? (CE_MATCH_REFRESH |
CE_MATCH_IGNORE_MISSING) : 0 ));
int ret;
ce = make_cache_entry(mode, oid ? oid->hash : null_sha1, path, stage, 0);
if (!ce)
return error(_("addinfo_cache failed for path '%s'"), path);
return add_cache_entry(ce, options);
ret = add_cache_entry(ce, options);
if (refresh) {
struct cache_entry *nce;
nce = refresh_cache_entry(ce, CE_MATCH_REFRESH | CE_MATCH_IGNORE_MISSING);
if (nce != ce)
ret = add_cache_entry(nce, options);
}
return ret;
}
static void init_tree_desc_from_tree(struct tree_desc *desc, struct tree *tree)