{"thread":{"id":"15891","subject":"[PATCH] git-gui: Do not munge conflict marker lines in a normal diff","startedAt":"2008-10-14T11:48:37Z","lastAt":"2008-10-14T11:48:37Z","messageCount":1,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"93001","messageId":"48F48715.9070105@viscovery.net","threadId":"15891","inReplyTo":null,"subject":"[PATCH] git-gui: Do not munge conflict marker lines in a normal diff","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-10-14T11:48:37Z","receivedAt":"2008-10-14T11:48:37Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <johannes.sixt@telecom.at>\n\nPreviously, conflict markers were highlighted in two ways: (1) They\nreceived a distinguishing color; and (2) they had the '+' removed at the\nbeginning of the line. However, by doing (2), a hunk that contained\nconflict markers could not be staged or unstaged because the resulting\npatch was corrupted. With this change we no longer modify the diff text\nof a 2-way diff, so that \"Stage Hunk\" and friends work.\n\nNote that 3-way diff of a conflicted file is unaffected by this change,\nand '++' before conflict markers is still removed. But this has no negative\nimpact because in this mode staging hunks or lines is disabled anyway.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n lib/diff.tcl |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/lib/diff.tcl b/lib/diff.tcl\nindex bdcbbf8..94ee38c 100644\n--- a/lib/diff.tcl\n+++ b/lib/diff.tcl\n@@ -377,7 +377,6 @@ proc read_diff {fd cont_info} {\n \t\t\t{+} {\n \t\t\t\tif {[regexp {^\\+([<>]{7} |={7})} $line _g op]} {\n \t\t\t\t\tset is_conflict_diff 1\n-\t\t\t\t\tset line [string replace $line 0 0 { }]\n \t\t\t\t\tset tags d$op\n \t\t\t\t} else {\n \t\t\t\t\tset tags d_+\n-- \n1.6.0.2.1493.g2969e\n"}]}