git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-gui: 'Unhandled 2 way diff marker:' for typechanged path
@ 2010-10-25 12:59 Bert Wesarg
  2010-10-28 12:27 ` [PATCH] git-gui: handle symlink replaced by file Pat Thoyts
  0 siblings, 1 reply; 4+ messages in thread
From: Bert Wesarg @ 2010-10-25 12:59 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: Git Mailing List

Hi,

I get this error from git gui after I changed a symlink to a file:

error: Unhandled 2 way diff marker: {d}

To reproduce:

$ git init
$ ln -s bar foo
$ git add foo
$ git commit -m "add foo link"
$ rm foo
$ echo bar >foo
$ git gui
error: Unhandled 2 way diff marker: {d}

I may have a look into this by my self in the long term, but maybe
someone is faster than me.

Regards,
Bert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] git-gui: handle symlink replaced by file
  2010-10-25 12:59 git-gui: 'Unhandled 2 way diff marker:' for typechanged path Bert Wesarg
@ 2010-10-28 12:27 ` Pat Thoyts
  2010-11-03 20:07   ` Bert Wesarg
  0 siblings, 1 reply; 4+ messages in thread
From: Pat Thoyts @ 2010-10-28 12:27 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: Git Mailing List

If a symlink is replaced by a regular file an error message was emitted
on stdout. This patch adds recognition of this case.

Reported-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---

Bert Wesarg <bert.wesarg@googlemail.com> writes:
>Hi,
>
>I get this error from git gui after I changed a symlink to a file:
>
>error: Unhandled 2 way diff marker: {d}
>
>To reproduce:
>
>$ git init
>$ ln -s bar foo
>$ git add foo
>$ git commit -m "add foo link"
>$ rm foo
>$ echo bar >foo
>$ git gui
>error: Unhandled 2 way diff marker: {d}
>
>I may have a look into this by my self in the long term, but maybe
>someone is faster than me.

This patch just handles the second segment without generating the error
really. It doesn't attempt to do any pretty output.

 lib/diff.tcl |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/diff.tcl b/lib/diff.tcl
index c628750..4d041fa 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -428,6 +428,14 @@ proc read_diff {fd cont_info} {
 					set tags d_+
 				}
 			}
+			{d} {
+				if {[string match {diff --git *} $line]} {
+					set ::current_diff_inheader 1
+					continue
+				} else {
+					puts "error: unrecognized operation: '$line'"
+				}
+			}
 			default {
 				puts "error: Unhandled 2 way diff marker: {$op}"
 				set tags {}
-- 
1.7.3.1.msysgit.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-gui: handle symlink replaced by file
  2010-10-28 12:27 ` [PATCH] git-gui: handle symlink replaced by file Pat Thoyts
@ 2010-11-03 20:07   ` Bert Wesarg
  2010-12-06 21:26     ` Bert Wesarg
  0 siblings, 1 reply; 4+ messages in thread
From: Bert Wesarg @ 2010-11-03 20:07 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: Git Mailing List

On Thu, Oct 28, 2010 at 14:27, Pat Thoyts
<patthoyts@users.sourceforge.net> wrote:
> This patch just handles the second segment without generating the error
> really. It doesn't attempt to do any pretty output.

Thanks for the patch. I haven't test it yet. Actually I can't find
documentation, that git outputs two diffs when the path changes the
type. And I have no idea how to present this in git gui.

Bert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-gui: handle symlink replaced by file
  2010-11-03 20:07   ` Bert Wesarg
@ 2010-12-06 21:26     ` Bert Wesarg
  0 siblings, 0 replies; 4+ messages in thread
From: Bert Wesarg @ 2010-12-06 21:26 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: Git Mailing List

On Wed, Nov 3, 2010 at 21:07, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> On Thu, Oct 28, 2010 at 14:27, Pat Thoyts
> <patthoyts@users.sourceforge.net> wrote:
>> This patch just handles the second segment without generating the error
>> really. It doesn't attempt to do any pretty output.
>
> Thanks for the patch. I haven't test it yet. Actually I can't find
> documentation, that git outputs two diffs when the path changes the
> type. And I have no idea how to present this in git gui.

I have a better fix for this. But haven't the time to send it yet.

Bert

>
> Bert
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-06 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 12:59 git-gui: 'Unhandled 2 way diff marker:' for typechanged path Bert Wesarg
2010-10-28 12:27 ` [PATCH] git-gui: handle symlink replaced by file Pat Thoyts
2010-11-03 20:07   ` Bert Wesarg
2010-12-06 21:26     ` Bert Wesarg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).