Merge branch 'jc/renormalize-merge-kill-safer-crlf'
authorJunio C Hamano <gitster@pobox.com>
Mon, 19 Dec 2016 22:45:30 +0000 (14:45 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Dec 2016 22:45:30 +0000 (14:45 -0800)
Fix a corner case in merge-recursive regression that crept in
during 2.10 development cycle.

* jc/renormalize-merge-kill-safer-crlf:
convert: git cherry-pick -Xrenormalize did not work
merge-recursive: handle NULL in add_cacheinfo() correctly
cherry-pick: demonstrate a segmentation fault

1  2 
convert.c
merge-recursive.c
t/t3501-revert-cherry-pick.sh
diff --cc convert.c
Simple merge
index c07ba0df9d908782d6001c9c9c4aab2a0036b9a8,56385d4c01b732b77fdf463408109f8d3ca67be8..23d6992f4037b37a9c3e133001af16595e8da394
@@@ -235,6 -213,8 +235,8 @@@ static int add_cacheinfo(struct merge_o
                struct cache_entry *nce;
  
                nce = refresh_cache_entry(ce, CE_MATCH_REFRESH | CE_MATCH_IGNORE_MISSING);
 -                      return error(_("addinfo_cache failed for path '%s'"), path);
+               if (!nce)
++                      return err(o, _("addinfo_cache failed for path '%s'"), path);
                if (nce != ce)
                        ret = add_cache_entry(nce, options);
        }
Simple merge