{"thread":{"id":"25546","subject":"git-gui: 'Unhandled 2 way diff marker:' for typechanged path","startedAt":"2010-10-25T12:59:00Z","lastAt":"2010-12-06T21:26:10Z","messageCount":4,"participants":["Bert Wesarg","Pat Thoyts"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"154405","messageId":"AANLkTi=dA+mj1KDpAgGAtg1S5Gt5wXAJ4zLd-tLob=DH@mail.gmail.com","threadId":"25546","inReplyTo":null,"subject":"git-gui: 'Unhandled 2 way diff marker:' for typechanged path","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-10-25T12:59:00Z","receivedAt":"2010-10-25T12:59:00Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Hi,\n\nI get this error from git gui after I changed a symlink to a file:\n\nerror: Unhandled 2 way diff marker: {d}\n\nTo reproduce:\n\n$ git init\n$ ln -s bar foo\n$ git add foo\n$ git commit -m \"add foo link\"\n$ rm foo\n$ echo bar >foo\n$ git gui\nerror: Unhandled 2 way diff marker: {d}\n\nI may have a look into this by my self in the long term, but maybe\nsomeone is faster than me.\n\nRegards,\nBert\n"},{"id":"154678","messageId":"8739rqqb4m.fsf@fox.patthoyts.tk","threadId":"25546","inReplyTo":"AANLkTi=dA+mj1KDpAgGAtg1S5Gt5wXAJ4zLd-tLob=DH@mail.gmail.com","subject":"[PATCH] git-gui: handle symlink replaced by file","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-10-28T12:27:09Z","receivedAt":"2010-10-28T12:27:09Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"If a symlink is replaced by a regular file an error message was emitted\non stdout. This patch adds recognition of this case.\n\nReported-by: Bert Wesarg <bert.wesarg@googlemail.com>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n\nBert Wesarg <bert.wesarg@googlemail.com> writes:\n>Hi,\n>\n>I get this error from git gui after I changed a symlink to a file:\n>\n>error: Unhandled 2 way diff marker: {d}\n>\n>To reproduce:\n>\n>$ git init\n>$ ln -s bar foo\n>$ git add foo\n>$ git commit -m \"add foo link\"\n>$ rm foo\n>$ echo bar >foo\n>$ git gui\n>error: Unhandled 2 way diff marker: {d}\n>\n>I may have a look into this by my self in the long term, but maybe\n>someone is faster than me.\n\nThis patch just handles the second segment without generating the error\nreally. It doesn't attempt to do any pretty output.\n\n lib/diff.tcl |    8 ++++++++\n 1 files changed, 8 insertions(+), 0 deletions(-)\n\ndiff --git a/lib/diff.tcl b/lib/diff.tcl\nindex c628750..4d041fa 100644\n--- a/lib/diff.tcl\n+++ b/lib/diff.tcl\n@@ -428,6 +428,14 @@ proc read_diff {fd cont_info} {\n \t\t\t\t\tset tags d_+\n \t\t\t\t}\n \t\t\t}\n+\t\t\t{d} {\n+\t\t\t\tif {[string match {diff --git *} $line]} {\n+\t\t\t\t\tset ::current_diff_inheader 1\n+\t\t\t\t\tcontinue\n+\t\t\t\t} else {\n+\t\t\t\t\tputs \"error: unrecognized operation: '$line'\"\n+\t\t\t\t}\n+\t\t\t}\n \t\t\tdefault {\n \t\t\t\tputs \"error: Unhandled 2 way diff marker: {$op}\"\n \t\t\t\tset tags {}\n-- \n1.7.3.1.msysgit.0\n"},{"id":"155083","messageId":"AANLkTi=P+sKzYSkeS2-N+DerP3zdRgrDnuNuXbK0O89s@mail.gmail.com","threadId":"25546","inReplyTo":"8739rqqb4m.fsf@fox.patthoyts.tk","subject":"Re: [PATCH] git-gui: handle symlink replaced by file","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-11-03T20:07:11Z","receivedAt":"2010-11-03T20:07:11Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Thu, Oct 28, 2010 at 14:27, Pat Thoyts\n<patthoyts@users.sourceforge.net> wrote:\n> This patch just handles the second segment without generating the error\n> really. It doesn't attempt to do any pretty output.\n\nThanks for the patch. I haven't test it yet. Actually I can't find\ndocumentation, that git outputs two diffs when the path changes the\ntype. And I have no idea how to present this in git gui.\n\nBert\n"},{"id":"157434","messageId":"AANLkTi=ZxrnfjoXHHwUC8p7KwXiGgjXwGr=6BMBzjB6R@mail.gmail.com","threadId":"25546","inReplyTo":"AANLkTi=P+sKzYSkeS2-N+DerP3zdRgrDnuNuXbK0O89s@mail.gmail.com","subject":"Re: [PATCH] git-gui: handle symlink replaced by file","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2010-12-06T21:26:10Z","receivedAt":"2010-12-06T21:26:10Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Wed, Nov 3, 2010 at 21:07, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> On Thu, Oct 28, 2010 at 14:27, Pat Thoyts\n> <patthoyts@users.sourceforge.net> wrote:\n>> This patch just handles the second segment without generating the error\n>> really. It doesn't attempt to do any pretty output.\n>\n> Thanks for the patch. I haven't test it yet. Actually I can't find\n> documentation, that git outputs two diffs when the path changes the\n> type. And I have no idea how to present this in git gui.\n\nI have a better fix for this. But haven't the time to send it yet.\n\nBert\n\n>\n> Bert\n>\n"}]}