{"thread":{"id":"26819","subject":"Meaning of double + and - in Gitk's diff pane","startedAt":"2011-03-21T18:38:29Z","lastAt":"2011-03-21T20:40:24Z","messageCount":6,"participants":["Dirk Süsserott","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163950","messageId":"4D879B25.9090300@dirk.my1.cc","threadId":"26819","inReplyTo":null,"subject":"Meaning of double + and - in Gitk's diff pane","fromName":"Dirk Süsserott","fromEmail":"newsletter@dirk.my1.cc","sentAt":"2011-03-21T18:38:29Z","receivedAt":"2011-03-21T18:38:29Z","isPatch":false,"sender":{"key":"newsletter@dirk.my1.cc","avatar":null},"body":"Hello,\n\nI regularly use gitk to get an overview. Great tool.\nBut sometimes it shows me in the diff pane lines preceeded\nwith two + or - signs or they are colored in blue or black\nor printed in bold. I think this is true for merge commits\nwith conflicts.\n\nThe simple red - and green + lines are obvious, but is\nanywhere documented what exactly the other fonts and colors\nmean? I tried to \"Ask The Audience\" (which is Google), but\ntry searching for plus and minus! It's pointless.\n\nDirk\n"},{"id":"163960","messageId":"7vr5a0p8n1.fsf@alter.siamese.dyndns.org","threadId":"26819","inReplyTo":"4D879B25.9090300@dirk.my1.cc","subject":"Re: Meaning of double + and - in Gitk's diff pane","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T19:37:38Z","receivedAt":"2011-03-21T19:37:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dirk Süsserott <newsletter@dirk.my1.cc> writes:\n\n> I regularly use gitk to get an overview. Great tool.\n> But sometimes it shows me in the diff pane lines preceeded\n> with two + or - signs or they are colored in blue or black\n> or printed in bold. I think this is true for merge commits\n> with conflicts.\n\nLook at the bottom summary of this message for a brief summary:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15527\n\nIf you want to know more about how the multi-way diff is condensed, you\nwould find this message from Linus in the same thread illuminating:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15600\n\n(Ignore the bottom part where Linus complains about gitk output---the old\nimplementation in gitk has gone long time ago).\n\nAnd also this one, again from Linus:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15491\n"},{"id":"163963","messageId":"4D87AAD6.6000704@dirk.my1.cc","threadId":"26819","inReplyTo":"7vr5a0p8n1.fsf@alter.siamese.dyndns.org","subject":"Re: Meaning of double + and - in Gitk's diff pane","fromName":"Dirk Süsserott","fromEmail":"newsletter@dirk.my1.cc","sentAt":"2011-03-21T19:45:26Z","receivedAt":"2011-03-21T19:45:26Z","isPatch":false,"sender":{"key":"newsletter@dirk.my1.cc","avatar":null},"body":"Am 21.03.2011 20:37 schrieb Junio C Hamano:\n> Dirk Süsserott<newsletter@dirk.my1.cc>  writes:\n>\n>> I regularly use gitk to get an overview. Great tool.\n>> But sometimes it shows me in the diff pane lines preceeded\n>> with two + or - signs or they are colored in blue or black\n>> or printed in bold. I think this is true for merge commits\n>> with conflicts.\n>\n> Look at the bottom summary of this message for a brief summary:\n>\n>    http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15527\n>\n> If you want to know more about how the multi-way diff is condensed, you\n> would find this message from Linus in the same thread illuminating:\n>\n>    http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15600\n>\n> (Ignore the bottom part where Linus complains about gitk output---the old\n> implementation in gitk has gone long time ago).\n>\n> And also this one, again from Linus:\n>\n>    http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15491\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\nJunio, thanks. When I've found the time, I'll probably condense Linus'\nexplanations and submit a documentation patch. It's not explained\nin the actual git docs, right?\n"},{"id":"163967","messageId":"7vaagop83d.fsf@alter.siamese.dyndns.org","threadId":"26819","inReplyTo":"4D87AAD6.6000704@dirk.my1.cc","subject":"Re: Meaning of double + and - in Gitk's diff pane","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T19:49:26Z","receivedAt":"2011-03-21T19:49:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dirk Süsserott <newsletter@dirk.my1.cc> writes:\n\n> Am 21.03.2011 20:37 schrieb Junio C Hamano:\n>> Dirk Süsserott<newsletter@dirk.my1.cc>  writes:\n>>\n>>> I regularly use gitk to get an overview. Great tool.\n>>> But sometimes it shows me in the diff pane lines preceeded\n>>> with two + or - signs or they are colored in blue or black\n>>> or printed in bold. I think this is true for merge commits\n>>> with conflicts.\n>>\n>> Look at the bottom summary of this message for a brief summary:\n>>\n>>    http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15527\n>>\n>> If you want to know more about how the multi-way diff is condensed, you\n>> would find this message from Linus in the same thread illuminating:\n>>\n>>    http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15600\n>>\n>> (Ignore the bottom part where Linus complains about gitk output---the old\n>> implementation in gitk has gone long time ago).\n>>\n>> And also this one, again from Linus:\n>>\n>>    http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15491\n>>\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>>\n>\n> Junio, thanks. When I've found the time, I'll probably condense Linus'\n> explanations and submit a documentation patch. It's not explained\n> in the actual git docs, right?\n\nHow about checking \"git diff\"?  The same conclusion should be in there, as\nI wrote the implementation, docs and the messages there.\n"},{"id":"163971","messageId":"4D87AD9D.7080501@dirk.my1.cc","threadId":"26819","inReplyTo":"7vaagop83d.fsf@alter.siamese.dyndns.org","subject":"Re: Meaning of double + and - in Gitk's diff pane","fromName":"Dirk Süsserott","fromEmail":"newsletter@dirk.my1.cc","sentAt":"2011-03-21T19:57:17Z","receivedAt":"2011-03-21T19:57:17Z","isPatch":false,"sender":{"key":"newsletter@dirk.my1.cc","avatar":null},"body":"Am 21.03.2011 20:49 schrieb Junio C Hamano:\n>>\n>> Junio, thanks. When I've found the time, I'll probably condense Linus'\n>> explanations and submit a documentation patch. It's not explained\n>> in the actual git docs, right?\n>\n> How about checking \"git diff\"?  The same conclusion should be in there, as\n> I wrote the implementation, docs and the messages there.\n>\n\nUhh, sorry, I missed that. That was actually what I was searching for.\nThanks.\n"},{"id":"163980","messageId":"7vwrjsnr5z.fsf@alter.siamese.dyndns.org","threadId":"26819","inReplyTo":"4D87AD9D.7080501@dirk.my1.cc","subject":"Re: Meaning of double + and - in Gitk's diff pane","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T20:40:24Z","receivedAt":"2011-03-21T20:40:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dirk Süsserott <newsletter@dirk.my1.cc> writes:\n\n> Am 21.03.2011 20:49 schrieb Junio C Hamano:\n>>>\n>>> Junio, thanks. When I've found the time, I'll probably condense Linus'\n>>> explanations and submit a documentation patch. It's not explained\n>>> in the actual git docs, right?\n>>\n>> How about checking \"git diff\"?  The same conclusion should be in there, as\n>> I wrote the implementation, docs and the messages there.\n>>\n> Uhh, sorry, I missed that. That was actually what I was searching for.\n\nHmm... re-reading \"git diff --help\" and looking at the section on combined\ndiff, I notice that we talk about how to understand its output, but we\ndon't say under what rule the --cc option condenses what would be produced\nwith the -c option.  Perhaps we would need a patch after all at the end of\nDocumentation/diff-generate-patch.txt file.\n\nHere is a quick attempt.\n\n Documentation/diff-generate-patch.txt |   18 ++++++++++++++++++\n 1 files changed, 18 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt\nindex c57460c..20a603d 100644\n--- a/Documentation/diff-generate-patch.txt\n+++ b/Documentation/diff-generate-patch.txt\n@@ -183,3 +183,21 @@ parents).  When shown by `git diff-files -c`, it compares the\n two unresolved merge parents with the working tree file\n (i.e. file1 is stage 2 aka \"our version\", file2 is stage 3 aka\n \"their version\").\n+\n+The \"combined\" format (`-c` option) shows the diff to the result (i.e. the\n+result of the merge, or the file in the working tree during a conflict\n+resolution) from two or more originals (i.e. parents of the merge or\n+branches being merged) combined, but it often shows many trivial changes\n+that the result takes the change from a single original verbatim.  The\n+\"dense combined\" format (`--cc` option) removes such hunks with only\n+\"trivial\" changes. A hunk that has only two versions (or less) in the\n+original (in a usual two-parent merge, this always is the case, simply\n+because there are only two originals) and whose result matches exactly one\n+of the originals, is considered \"trivial\" and is omitted from the output\n+in the \"dense combined\" format.  In the previous illustration of a\n+combined diff on `describe.c` file, there are two originals, one that had\n+the describe function with a single `char *arg` parameter, and the other\n+with two parameters, but the result matches neither of them, hence it is\n+not \"trivial\" and the hunk appears in the output.\n+\n+\n"}]}