* Meaning of double + and - in Gitk's diff pane
@ 2011-03-21 18:38 Dirk Süsserott
2011-03-21 19:37 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Dirk Süsserott @ 2011-03-21 18:38 UTC (permalink / raw)
To: Git Mailing List
Hello,
I regularly use gitk to get an overview. Great tool.
But sometimes it shows me in the diff pane lines preceeded
with two + or - signs or they are colored in blue or black
or printed in bold. I think this is true for merge commits
with conflicts.
The simple red - and green + lines are obvious, but is
anywhere documented what exactly the other fonts and colors
mean? I tried to "Ask The Audience" (which is Google), but
try searching for plus and minus! It's pointless.
Dirk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meaning of double + and - in Gitk's diff pane
2011-03-21 18:38 Meaning of double + and - in Gitk's diff pane Dirk Süsserott
@ 2011-03-21 19:37 ` Junio C Hamano
2011-03-21 19:45 ` Dirk Süsserott
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2011-03-21 19:37 UTC (permalink / raw)
To: Dirk Süsserott; +Cc: Git Mailing List
Dirk Süsserott <newsletter@dirk.my1.cc> writes:
> I regularly use gitk to get an overview. Great tool.
> But sometimes it shows me in the diff pane lines preceeded
> with two + or - signs or they are colored in blue or black
> or printed in bold. I think this is true for merge commits
> with conflicts.
Look at the bottom summary of this message for a brief summary:
http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15527
If you want to know more about how the multi-way diff is condensed, you
would find this message from Linus in the same thread illuminating:
http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15600
(Ignore the bottom part where Linus complains about gitk output---the old
implementation in gitk has gone long time ago).
And also this one, again from Linus:
http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15491
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meaning of double + and - in Gitk's diff pane
2011-03-21 19:37 ` Junio C Hamano
@ 2011-03-21 19:45 ` Dirk Süsserott
2011-03-21 19:49 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Dirk Süsserott @ 2011-03-21 19:45 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
Am 21.03.2011 20:37 schrieb Junio C Hamano:
> Dirk Süsserott<newsletter@dirk.my1.cc> writes:
>
>> I regularly use gitk to get an overview. Great tool.
>> But sometimes it shows me in the diff pane lines preceeded
>> with two + or - signs or they are colored in blue or black
>> or printed in bold. I think this is true for merge commits
>> with conflicts.
>
> Look at the bottom summary of this message for a brief summary:
>
> http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15527
>
> If you want to know more about how the multi-way diff is condensed, you
> would find this message from Linus in the same thread illuminating:
>
> http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15600
>
> (Ignore the bottom part where Linus complains about gitk output---the old
> implementation in gitk has gone long time ago).
>
> And also this one, again from Linus:
>
> http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15491
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Junio, thanks. When I've found the time, I'll probably condense Linus'
explanations and submit a documentation patch. It's not explained
in the actual git docs, right?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meaning of double + and - in Gitk's diff pane
2011-03-21 19:45 ` Dirk Süsserott
@ 2011-03-21 19:49 ` Junio C Hamano
2011-03-21 19:57 ` Dirk Süsserott
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2011-03-21 19:49 UTC (permalink / raw)
To: Dirk Süsserott; +Cc: Junio C Hamano, Git Mailing List
Dirk Süsserott <newsletter@dirk.my1.cc> writes:
> Am 21.03.2011 20:37 schrieb Junio C Hamano:
>> Dirk Süsserott<newsletter@dirk.my1.cc> writes:
>>
>>> I regularly use gitk to get an overview. Great tool.
>>> But sometimes it shows me in the diff pane lines preceeded
>>> with two + or - signs or they are colored in blue or black
>>> or printed in bold. I think this is true for merge commits
>>> with conflicts.
>>
>> Look at the bottom summary of this message for a brief summary:
>>
>> http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15527
>>
>> If you want to know more about how the multi-way diff is condensed, you
>> would find this message from Linus in the same thread illuminating:
>>
>> http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15600
>>
>> (Ignore the bottom part where Linus complains about gitk output---the old
>> implementation in gitk has gone long time ago).
>>
>> And also this one, again from Linus:
>>
>> http://thread.gmane.org/gmane.comp.version-control.git/15486/focus=15491
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> Junio, thanks. When I've found the time, I'll probably condense Linus'
> explanations and submit a documentation patch. It's not explained
> in the actual git docs, right?
How about checking "git diff"? The same conclusion should be in there, as
I wrote the implementation, docs and the messages there.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meaning of double + and - in Gitk's diff pane
2011-03-21 19:49 ` Junio C Hamano
@ 2011-03-21 19:57 ` Dirk Süsserott
2011-03-21 20:40 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Dirk Süsserott @ 2011-03-21 19:57 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
Am 21.03.2011 20:49 schrieb Junio C Hamano:
>>
>> Junio, thanks. When I've found the time, I'll probably condense Linus'
>> explanations and submit a documentation patch. It's not explained
>> in the actual git docs, right?
>
> How about checking "git diff"? The same conclusion should be in there, as
> I wrote the implementation, docs and the messages there.
>
Uhh, sorry, I missed that. That was actually what I was searching for.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meaning of double + and - in Gitk's diff pane
2011-03-21 19:57 ` Dirk Süsserott
@ 2011-03-21 20:40 ` Junio C Hamano
0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2011-03-21 20:40 UTC (permalink / raw)
To: Dirk Süsserott; +Cc: Git Mailing List
Dirk Süsserott <newsletter@dirk.my1.cc> writes:
> Am 21.03.2011 20:49 schrieb Junio C Hamano:
>>>
>>> Junio, thanks. When I've found the time, I'll probably condense Linus'
>>> explanations and submit a documentation patch. It's not explained
>>> in the actual git docs, right?
>>
>> How about checking "git diff"? The same conclusion should be in there, as
>> I wrote the implementation, docs and the messages there.
>>
> Uhh, sorry, I missed that. That was actually what I was searching for.
Hmm... re-reading "git diff --help" and looking at the section on combined
diff, I notice that we talk about how to understand its output, but we
don't say under what rule the --cc option condenses what would be produced
with the -c option. Perhaps we would need a patch after all at the end of
Documentation/diff-generate-patch.txt file.
Here is a quick attempt.
Documentation/diff-generate-patch.txt | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index c57460c..20a603d 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -183,3 +183,21 @@ parents). When shown by `git diff-files -c`, it compares the
two unresolved merge parents with the working tree file
(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
"their version").
+
+The "combined" format (`-c` option) shows the diff to the result (i.e. the
+result of the merge, or the file in the working tree during a conflict
+resolution) from two or more originals (i.e. parents of the merge or
+branches being merged) combined, but it often shows many trivial changes
+that the result takes the change from a single original verbatim. The
+"dense combined" format (`--cc` option) removes such hunks with only
+"trivial" changes. A hunk that has only two versions (or less) in the
+original (in a usual two-parent merge, this always is the case, simply
+because there are only two originals) and whose result matches exactly one
+of the originals, is considered "trivial" and is omitted from the output
+in the "dense combined" format. In the previous illustration of a
+combined diff on `describe.c` file, there are two originals, one that had
+the describe function with a single `char *arg` parameter, and the other
+with two parameters, but the result matches neither of them, hence it is
+not "trivial" and the hunk appears in the output.
+
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-21 20:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 18:38 Meaning of double + and - in Gitk's diff pane Dirk Süsserott
2011-03-21 19:37 ` Junio C Hamano
2011-03-21 19:45 ` Dirk Süsserott
2011-03-21 19:49 ` Junio C Hamano
2011-03-21 19:57 ` Dirk Süsserott
2011-03-21 20:40 ` Junio C Hamano
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).