{"thread":{"id":"17327","subject":"bug: transform a binary file into a symlink in one commit => invalid binary patch","startedAt":"2009-01-23T12:25:30Z","lastAt":"2009-01-28T21:32:04Z","messageCount":7,"participants":["Pixel","Michael J Gruber","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"101654","messageId":"lyhc3q9pl1.fsf@leia.mandriva.com","threadId":"17327","inReplyTo":null,"subject":"bug: transform a binary file into a symlink in one commit => invalid binary patch","fromName":"Pixel","fromEmail":"pixel@mandriva.com","sentAt":"2009-01-23T12:25:30Z","receivedAt":"2009-01-23T12:25:30Z","isPatch":false,"sender":{"key":"pixel@mandriva.com","avatar":null},"body":"hi, \n\ni hit a bug (git 1.6.1): when you transform a binary file into a\nsymlink in one commit, the binary patch can't be used in \"git apply\".\nIs it a known issue?\n\n\nreproducer: \n\n----------\n#!/bin/sh -e\n\n# the bug: if you transform a binary file into a symlink in one commit, \n# the binary patch can't be used in \"git apply\"\n#\n# nb: if you uncomment the \"##\" lines, the problem disappears\n# since the first patch will empty the binary file then the non-binary file\n# will be transformed into a symlink\n\nrm -rf t t2\nmkdir t\ndd if=/dev/urandom of=t/a count=10\ncp -r t t2\n\ncd t\ngit init\ngit add .\ngit commit -m initial\n\n##echo -n > a\n##git commit -a -m foo\nln -sf zzz a\ngit commit -a -m foo2\ngit format-patch :/initial\n\ncd ../t2\ngit apply ../t/*.patch\n\ncd ..\nrm -rf t t2\n----------\n"},{"id":"101656","messageId":"4979C295.1000803@drmicha.warpmail.net","threadId":"17327","inReplyTo":"lyhc3q9pl1.fsf@leia.mandriva.com","subject":"Re: bug: transform a binary file into a symlink in one commit => invalid binary patch","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-01-23T13:13:57Z","receivedAt":"2009-01-23T13:13:57Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Pixel venit, vidit, dixit 23.01.2009 13:25:\n> hi, \n> \n> i hit a bug (git 1.6.1): when you transform a binary file into a\n> symlink in one commit, the binary patch can't be used in \"git apply\".\n> Is it a known issue?\n> \n> \n> reproducer: \n> \n> ----------\n> #!/bin/sh -e\n> \n> # the bug: if you transform a binary file into a symlink in one commit, \n> # the binary patch can't be used in \"git apply\"\n> #\n> # nb: if you uncomment the \"##\" lines, the problem disappears\n> # since the first patch will empty the binary file then the non-binary file\n> # will be transformed into a symlink\n> \n> rm -rf t t2\n> mkdir t\n> dd if=/dev/urandom of=t/a count=10\n> cp -r t t2\n> \n> cd t\n> git init\n> git add .\n> git commit -m initial\n> \n> ##echo -n > a\n> ##git commit -a -m foo\n> ln -sf zzz a\n> git commit -a -m foo2\n> git format-patch :/initial\n> \n> cd ../t2\n> git apply ../t/*.patch\n> \n> cd ..\n> rm -rf t t2\n> ----------\n\nYou're not even initialising a repo in t2. I assume you want to \"cp -a t\nt2\" after the \"initial\" commit, don't you? Doing that I get\n\nerror: binary patch to 'a' creates incorrect result (expecting\ne132db255c0e0e3e9309c3c58a0a9c9eb97dd942, got\ne69de29bb2d1d6434b8b29ae775ad8c2e48c5391)\nerror: a: patch does not apply\nerror: a: already exists in working directory\n\nwhich is not that magnificient either. If that's the error you're after\nyour test script needs to be modified.\n\nMichael\n"},{"id":"101920","messageId":"20090126003556.GA19368@coredump.intra.peff.net","threadId":"17327","inReplyTo":"lyhc3q9pl1.fsf@leia.mandriva.com","subject":"Re: bug: transform a binary file into a symlink in one commit => invalid binary patch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-01-26T00:35:56Z","receivedAt":"2009-01-26T00:35:56Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Jan 23, 2009 at 01:25:30PM +0100, Pixel wrote:\n\n> i hit a bug (git 1.6.1): when you transform a binary file into a\n> symlink in one commit, the binary patch can't be used in \"git apply\".\n> Is it a known issue?\n\nNot that I know of.\n\nBelow is a patch against the test suite that fairly neatly displays the\nproblem. I didn't get a chance to look into actually fixing it, though\n(I'm not even sure the problem is in apply, and not in the generated\npatch).\n\n---\ndiff --git a/t/t4130-apply-symlink-binary.sh b/t/t4130-apply-symlink-binary.sh\nnew file mode 100755\nindex 0000000..0ee2ba1\n--- /dev/null\n+++ b/t/t4130-apply-symlink-binary.sh\n@@ -0,0 +1,30 @@\n+#!/bin/sh\n+\n+test_description='apply handles binary to symlink conversion'\n+. ./test-lib.sh\n+\n+test_expect_success 'create commit with binary' '\n+\techo content >file && git add file &&\n+\tprintf \"\\0\" > binary && git add binary &&\n+\tgit commit -m one\n+'\n+\n+test_expect_success 'convert binary to symlink' '\n+\trm binary &&\n+\tln -s file binary &&\n+\tgit add binary &&\n+\tgit commit -m two\n+'\n+\n+test_expect_success 'create patch' '\n+\tgit diff-tree --binary HEAD^ HEAD >patch\n+'\n+\n+test_expect_success 'apply patch' '\n+\tgit reset --hard HEAD^ &&\n+\tgit apply patch &&\n+\ttest -h binary &&\n+\ttest_cmp binary file\n+'\n+\n+test_done\n"},{"id":"101947","messageId":"7vy6wy8qmm.fsf@gitster.siamese.dyndns.org","threadId":"17327","inReplyTo":"20090126003556.GA19368@coredump.intra.peff.net","subject":"Re: bug: transform a binary file into a symlink in one commit => invalid binary patch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T07:37:21Z","receivedAt":"2009-01-26T07:37:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Fri, Jan 23, 2009 at 01:25:30PM +0100, Pixel wrote:\n>\n>> i hit a bug (git 1.6.1): when you transform a binary file into a\n>> symlink in one commit, the binary patch can't be used in \"git apply\".\n>> Is it a known issue?\n>\n> Not that I know of.\n>\n> Below is a patch against the test suite that fairly neatly displays the\n> problem. I didn't get a chance to look into actually fixing it, though\n> (I'm not even sure the problem is in apply, and not in the generated\n> patch).\n\nThe generated diff is wrong.\n\nA filepair that changes type must be split into deletion followed by\ncreation, which means the \"index\" line should say 0{40} on the right hand\nside for the first half and then 0{40} on the left hand side for the\nsecond half.  The patch generated by this step:\n\n> +test_expect_success 'create patch' '\n> +\tgit diff-tree --binary HEAD^ HEAD >patch\n> +'\n\nHowever says the blob contents change from \"\\0\" to \"file\" on both.\n\nThis is because diff.c::run_diff() computes \"index\" only once and reuses\nit for both halves.\n"},{"id":"101951","messageId":"7vhc3m8o0b.fsf_-_@gitster.siamese.dyndns.org","threadId":"17327","inReplyTo":"7vy6wy8qmm.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] diff.c: output correct index lines for a split diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T08:33:56Z","receivedAt":"2009-01-26T08:33:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"A patch that changes the filetype (e.g. regular file to symlink) of a path\nmust be split into a deletion event followed by a creation event, which\nmeans that we need to have two independent metainfo lines for each.\nHowever, the code reused the single set of metainfo lines.\n\nAs the blob object names recorded on the index lines are usually not used\nnor validated on the receiving end, this is not an issue with normal use\nof the resulting patch.  However, when accepting a binary patch to delete\na blob, git-apply verified that the postimage blob object name on the\nindex line is 0{40}, hence a patch that deletes a regular file blob that\nrecords binary contents to create a blob with different filetype (e.g. a\nsymbolic link) failed to apply.  \"git am -3\" also uses the blob object\nnames recorded on the index line, so it would also misbehave when\nsynthesizing a preimage tree.\n\nThis moves the code to generate metainfo lines around, so that two\nindependent sets of metainfo lines are used for the split halves.\n\nThe fix revealed that one test expected the incorrect behaviour, which is\nalso fixed here.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n  Junio C Hamano <gitster@pobox.com> writes:\n\n  > Jeff King <peff@peff.net> writes:\n  > ...\n  >> Below is a patch against the test suite that fairly neatly displays the\n  >> problem. I didn't get a chance to look into actually fixing it, though\n  >> (I'm not even sure the problem is in apply, and not in the generated\n  >> patch).\n  >\n  > The generated diff is wrong.\n  >\n  > A filepair that changes type must be split into deletion followed by\n  > creation, which means the \"index\" line should say 0{40} on the right hand\n  > side for the first half and then 0{40} on the left hand side for the\n  > second half.  The patch generated by this step:\n  >\n  >> +test_expect_success 'create patch' '\n  >> +\tgit diff-tree --binary HEAD^ HEAD >patch\n  >> +'\n  >\n  > However says the blob contents change from \"\\0\" to \"file\" on both.\n  >\n  > This is because diff.c::run_diff() computes \"index\" only once and reuses\n  > it for both halves.\n\nI did not include your new test script here; perhaps we can add it to an\nexisting typechange diff/apply test, like t4114?\n\n diff.c                   |  146 +++++++++++++++++++++++++---------------------\n t/t4030-diff-textconv.sh |    2 +-\n 2 files changed, 81 insertions(+), 67 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 972b3da..7e18364 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -2081,16 +2081,86 @@ static void run_external_diff(const char *pgm,\n \t}\n }\n \n+static int similarity_index(struct diff_filepair *p)\n+{\n+\treturn p->score * 100 / MAX_SCORE;\n+}\n+\n+static void fill_metainfo(struct strbuf *msg,\n+\t\t\t  const char *name,\n+\t\t\t  const char *other,\n+\t\t\t  struct diff_filespec *one,\n+\t\t\t  struct diff_filespec *two,\n+\t\t\t  struct diff_options *o,\n+\t\t\t  struct diff_filepair *p)\n+{\n+\tstrbuf_init(msg, PATH_MAX * 2 + 300);\n+\tswitch (p->status) {\n+\tcase DIFF_STATUS_COPIED:\n+\t\tstrbuf_addf(msg, \"similarity index %d%%\", similarity_index(p));\n+\t\tstrbuf_addstr(msg, \"\\ncopy from \");\n+\t\tquote_c_style(name, msg, NULL, 0);\n+\t\tstrbuf_addstr(msg, \"\\ncopy to \");\n+\t\tquote_c_style(other, msg, NULL, 0);\n+\t\tstrbuf_addch(msg, '\\n');\n+\t\tbreak;\n+\tcase DIFF_STATUS_RENAMED:\n+\t\tstrbuf_addf(msg, \"similarity index %d%%\", similarity_index(p));\n+\t\tstrbuf_addstr(msg, \"\\nrename from \");\n+\t\tquote_c_style(name, msg, NULL, 0);\n+\t\tstrbuf_addstr(msg, \"\\nrename to \");\n+\t\tquote_c_style(other, msg, NULL, 0);\n+\t\tstrbuf_addch(msg, '\\n');\n+\t\tbreak;\n+\tcase DIFF_STATUS_MODIFIED:\n+\t\tif (p->score) {\n+\t\t\tstrbuf_addf(msg, \"dissimilarity index %d%%\\n\",\n+\t\t\t\t    similarity_index(p));\n+\t\t\tbreak;\n+\t\t}\n+\t\t/* fallthru */\n+\tdefault:\n+\t\t/* nothing */\n+\t\t;\n+\t}\n+\tif (one && two && hashcmp(one->sha1, two->sha1)) {\n+\t\tint abbrev = DIFF_OPT_TST(o, FULL_INDEX) ? 40 : DEFAULT_ABBREV;\n+\n+\t\tif (DIFF_OPT_TST(o, BINARY)) {\n+\t\t\tmmfile_t mf;\n+\t\t\tif ((!fill_mmfile(&mf, one) && diff_filespec_is_binary(one)) ||\n+\t\t\t    (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two)))\n+\t\t\t\tabbrev = 40;\n+\t\t}\n+\t\tstrbuf_addf(msg, \"index %.*s..%.*s\",\n+\t\t\t    abbrev, sha1_to_hex(one->sha1),\n+\t\t\t    abbrev, sha1_to_hex(two->sha1));\n+\t\tif (one->mode == two->mode)\n+\t\t\tstrbuf_addf(msg, \" %06o\", one->mode);\n+\t\tstrbuf_addch(msg, '\\n');\n+\t}\n+\tif (msg->len)\n+\t\tstrbuf_setlen(msg, msg->len - 1);\n+}\n+\n static void run_diff_cmd(const char *pgm,\n \t\t\t const char *name,\n \t\t\t const char *other,\n \t\t\t const char *attr_path,\n \t\t\t struct diff_filespec *one,\n \t\t\t struct diff_filespec *two,\n-\t\t\t const char *xfrm_msg,\n+\t\t\t struct strbuf *msg,\n \t\t\t struct diff_options *o,\n-\t\t\t int complete_rewrite)\n+\t\t\t struct diff_filepair *p)\n {\n+\tconst char *xfrm_msg = NULL;\n+\tint complete_rewrite = (p->status == DIFF_STATUS_MODIFIED) && p->score;\n+\n+\tif (msg) {\n+\t\tfill_metainfo(msg, name, other, one, two, o, p);\n+\t\txfrm_msg = msg->len ? msg->buf : NULL;\n+\t}\n+\n \tif (!DIFF_OPT_TST(o, ALLOW_EXTERNAL))\n \t\tpgm = NULL;\n \telse {\n@@ -2130,11 +2200,6 @@ static void diff_fill_sha1_info(struct diff_filespec *one)\n \t\thashclr(one->sha1);\n }\n \n-static int similarity_index(struct diff_filepair *p)\n-{\n-\treturn p->score * 100 / MAX_SCORE;\n-}\n-\n static void strip_prefix(int prefix_length, const char **namep, const char **otherp)\n {\n \t/* Strip the prefix but do not molest /dev/null and absolute paths */\n@@ -2148,13 +2213,11 @@ static void run_diff(struct diff_filepair *p, struct diff_options *o)\n {\n \tconst char *pgm = external_diff();\n \tstruct strbuf msg;\n-\tchar *xfrm_msg;\n \tstruct diff_filespec *one = p->one;\n \tstruct diff_filespec *two = p->two;\n \tconst char *name;\n \tconst char *other;\n \tconst char *attr_path;\n-\tint complete_rewrite = 0;\n \n \tname  = p->one->path;\n \tother = (strcmp(name, p->two->path) ? p->two->path : NULL);\n@@ -2164,83 +2227,34 @@ static void run_diff(struct diff_filepair *p, struct diff_options *o)\n \n \tif (DIFF_PAIR_UNMERGED(p)) {\n \t\trun_diff_cmd(pgm, name, NULL, attr_path,\n-\t\t\t     NULL, NULL, NULL, o, 0);\n+\t\t\t     NULL, NULL, NULL, o, p);\n \t\treturn;\n \t}\n \n \tdiff_fill_sha1_info(one);\n \tdiff_fill_sha1_info(two);\n \n-\tstrbuf_init(&msg, PATH_MAX * 2 + 300);\n-\tswitch (p->status) {\n-\tcase DIFF_STATUS_COPIED:\n-\t\tstrbuf_addf(&msg, \"similarity index %d%%\", similarity_index(p));\n-\t\tstrbuf_addstr(&msg, \"\\ncopy from \");\n-\t\tquote_c_style(name, &msg, NULL, 0);\n-\t\tstrbuf_addstr(&msg, \"\\ncopy to \");\n-\t\tquote_c_style(other, &msg, NULL, 0);\n-\t\tstrbuf_addch(&msg, '\\n');\n-\t\tbreak;\n-\tcase DIFF_STATUS_RENAMED:\n-\t\tstrbuf_addf(&msg, \"similarity index %d%%\", similarity_index(p));\n-\t\tstrbuf_addstr(&msg, \"\\nrename from \");\n-\t\tquote_c_style(name, &msg, NULL, 0);\n-\t\tstrbuf_addstr(&msg, \"\\nrename to \");\n-\t\tquote_c_style(other, &msg, NULL, 0);\n-\t\tstrbuf_addch(&msg, '\\n');\n-\t\tbreak;\n-\tcase DIFF_STATUS_MODIFIED:\n-\t\tif (p->score) {\n-\t\t\tstrbuf_addf(&msg, \"dissimilarity index %d%%\\n\",\n-\t\t\t\t\tsimilarity_index(p));\n-\t\t\tcomplete_rewrite = 1;\n-\t\t\tbreak;\n-\t\t}\n-\t\t/* fallthru */\n-\tdefault:\n-\t\t/* nothing */\n-\t\t;\n-\t}\n-\n-\tif (hashcmp(one->sha1, two->sha1)) {\n-\t\tint abbrev = DIFF_OPT_TST(o, FULL_INDEX) ? 40 : DEFAULT_ABBREV;\n-\n-\t\tif (DIFF_OPT_TST(o, BINARY)) {\n-\t\t\tmmfile_t mf;\n-\t\t\tif ((!fill_mmfile(&mf, one) && diff_filespec_is_binary(one)) ||\n-\t\t\t    (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two)))\n-\t\t\t\tabbrev = 40;\n-\t\t}\n-\t\tstrbuf_addf(&msg, \"index %.*s..%.*s\",\n-\t\t\t\tabbrev, sha1_to_hex(one->sha1),\n-\t\t\t\tabbrev, sha1_to_hex(two->sha1));\n-\t\tif (one->mode == two->mode)\n-\t\t\tstrbuf_addf(&msg, \" %06o\", one->mode);\n-\t\tstrbuf_addch(&msg, '\\n');\n-\t}\n-\n-\tif (msg.len)\n-\t\tstrbuf_setlen(&msg, msg.len - 1);\n-\txfrm_msg = msg.len ? msg.buf : NULL;\n-\n \tif (!pgm &&\n \t    DIFF_FILE_VALID(one) && DIFF_FILE_VALID(two) &&\n \t    (S_IFMT & one->mode) != (S_IFMT & two->mode)) {\n-\t\t/* a filepair that changes between file and symlink\n+\t\t/*\n+\t\t * a filepair that changes between file and symlink\n \t\t * needs to be split into deletion and creation.\n \t\t */\n \t\tstruct diff_filespec *null = alloc_filespec(two->path);\n \t\trun_diff_cmd(NULL, name, other, attr_path,\n-\t\t\t     one, null, xfrm_msg, o, 0);\n+\t\t\t     one, null, &msg, o, p);\n \t\tfree(null);\n+\t\tstrbuf_release(&msg);\n+\n \t\tnull = alloc_filespec(one->path);\n \t\trun_diff_cmd(NULL, name, other, attr_path,\n-\t\t\t     null, two, xfrm_msg, o, 0);\n+\t\t\t     null, two, &msg, o, p);\n \t\tfree(null);\n \t}\n \telse\n \t\trun_diff_cmd(pgm, name, other, attr_path,\n-\t\t\t     one, two, xfrm_msg, o, complete_rewrite);\n+\t\t\t     one, two, &msg, o, p);\n \n \tstrbuf_release(&msg);\n }\ndiff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh\nindex 2f27a0b..a3f0897 100755\n--- a/t/t4030-diff-textconv.sh\n+++ b/t/t4030-diff-textconv.sh\n@@ -104,7 +104,7 @@ cat >expect.typechange <<'EOF'\n -1\n diff --git a/file b/file\n new file mode 120000\n-index ad8b3d2..67be421\n+index 0000000..67be421\n --- /dev/null\n +++ b/file\n @@ -0,0 +1 @@\n-- \n1.6.1.1.248.g7f6d2\n"},{"id":"101954","messageId":"20090126090712.GA12648@coredump.intra.peff.net","threadId":"17327","inReplyTo":"7vhc3m8o0b.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] diff.c: output correct index lines for a split diff","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-01-26T09:07:12Z","receivedAt":"2009-01-26T09:07:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 26, 2009 at 12:33:56AM -0800, Junio C Hamano wrote:\n\n> This moves the code to generate metainfo lines around, so that two\n> independent sets of metainfo lines are used for the split halves.\n\nThe patch and the generated output look correct to me, so\n\nAcked-by: Jeff King <peff@peff.net>\n\n> I did not include your new test script here; perhaps we can add it to an\n> existing typechange diff/apply test, like t4114?\n\nI think it makes sense to add to t4114. Please squash in the test below.\n\nOne think to note, though: test 8 (binary -> symlink) shows breakage\nwith the current master, but test 9 (symlink -> binary) does not.\nHowever, if you run the test under \"-d\" you can see that the diff has\nbogus metainfo. It's just that \"apply\" doesn't care.\n\nYour test fixes the test failure, and I verified manually that the diff\noutput is sensible. I don't think an additional test is worth it, but we\ncould add one that explicitly checks the metainfo if you want to be\nextra paranoid.\n\n---\ndiff --git a/t/t4114-apply-typechange.sh b/t/t4114-apply-typechange.sh\nindex 5533492..0f185ca 100755\n--- a/t/t4114-apply-typechange.sh\n+++ b/t/t4114-apply-typechange.sh\n@@ -25,6 +25,10 @@ test_expect_success 'setup repository and commits' '\n \tgit update-index foo &&\n \tgit commit -m \"foo back to file\" &&\n \tgit branch foo-back-to-file &&\n+\tprintf \"\\0\" > foo &&\n+\tgit update-index foo &&\n+\tgit commit -m \"foo becomes binary\" &&\n+\tgit branch foo-becomes-binary &&\n \trm -f foo &&\n \tgit update-index --remove foo &&\n \tmkdir foo &&\n@@ -85,6 +89,20 @@ test_expect_success 'symlink becomes file' '\n \t'\n test_debug 'cat patch'\n \n+test_expect_success 'binary file becomes symlink' '\n+\tgit checkout -f foo-becomes-binary &&\n+\tgit diff-tree -p --binary HEAD foo-symlinked-to-bar > patch &&\n+\tgit apply --index < patch\n+\t'\n+test_debug 'cat patch'\n+\n+test_expect_success 'symlink becomes binary file' '\n+\tgit checkout -f foo-symlinked-to-bar &&\n+\tgit diff-tree -p --binary HEAD foo-becomes-binary > patch &&\n+\tgit apply --index < patch\n+\t'\n+test_debug 'cat patch'\n+\n \n test_expect_success 'symlink becomes directory' '\n \tgit checkout -f foo-symlinked-to-bar &&\n"},{"id":"102354","messageId":"7vr62nktgr.fsf@gitster.siamese.dyndns.org","threadId":"17327","inReplyTo":"20090126090712.GA12648@coredump.intra.peff.net","subject":"Re: [PATCH] diff.c: output correct index lines for a split diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-28T21:32:04Z","receivedAt":"2009-01-28T21:32:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Mon, Jan 26, 2009 at 12:33:56AM -0800, Junio C Hamano wrote:\n>\n>> This moves the code to generate metainfo lines around, so that two\n>> independent sets of metainfo lines are used for the split halves.\n>\n> The patch and the generated output look correct to me, so\n>\n> Acked-by: Jeff King <peff@peff.net>\n>\n>> I did not include your new test script here; perhaps we can add it to an\n>> existing typechange diff/apply test, like t4114?\n>\n> I think it makes sense to add to t4114. Please squash in the test below.\n\nThanks.\n"}]}