Merge branch 'pw/add-p-recount' into pu
authorJunio C Hamano <gitster@pobox.com>
Fri, 23 Feb 2018 22:47:49 +0000 (14:47 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Feb 2018 22:47:49 +0000 (14:47 -0800)
commit0982f3744f2380fa78f11b2579ad876f40769489
treead2ac0f4f364c140dcccb76065750be8d979111c
parentab86a12de06c5358ced5b49058b1d0f863a680ae
parenta59ccbfc36e1631d5da920956382e48e55b44252
Merge branch 'pw/add-p-recount' into pu

"git add -p" has been lazy in coalescing split patches before
passing the result to underlying "git apply", leading to corner
case bugs; the logic to prepare the patch to be applied after hunk
selections has been tightened.

* pw/add-p-recount:
  add -p: don't rely on apply's '--recount' option
  add -p: fix counting when splitting and coalescing
  add -p: calculate offset delta for edited patches
  add -p: adjust offsets of subsequent hunks when one is skipped
  t3701: add failing test for pathological context lines
  t3701: don't hard code sha1 hash values
  t3701: use test_write_lines and write_script
  t3701: indent here documents
  add -i: add function to format hunk header
git-add--interactive.perl
t/t3701-add-interactive.sh