]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/renormalize-merge-kill-safer-crlf'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Jul 2016 21:13:38 +0000 (14:13 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jul 2016 21:13:39 +0000 (14:13 -0700)
"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

1  2 
Documentation/config.txt
Documentation/gitattributes.txt
cache.h
merge-recursive.c
read-cache.c

Simple merge
Simple merge
diff --cc cache.h
Simple merge
index 48fe7e738668e306127c4fad9348da2706950560,de37e5153c791cb51fc77974edc30d0c44daf4d7..a4a1195f61ea8ad8186726df1808a85b79415854
@@@ -202,12 -202,21 +202,21 @@@ static int add_cacheinfo(unsigned int m
                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, sha1 ? sha1 : null_sha1, path, stage, 0);
++      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)
diff --cc read-cache.c
Simple merge