Re: [PATCH] config option core.showroot to enable showing the diff of the root commit

3 messages, 2 authors, 2016-08-11 · open the first message on its own page

Re: [PATCH] config option core.showroot to enable showing the diff of the root commit

From: Junio C Hamano <hidden>
Date: 2016-08-11 20:31:50

Peter Baumann [off-list ref]
writes:
This allows one to see the root commit as a diff in commands like git-log,
git-show and git-whatchanged. It also modifies git-diff-tree to act as --root
was specified on the commandline. The default is set to true.

Signed-off-by: Peter Baumann <redacted>
---
I'm not sure if making core.showroot acting on git-diff-tree is the
right thing to do. Please check first bevore applying.
I agree that this "use --root by default" belongs to Porcelain
layer, not the plumbing.  We would probably want to do this in
the same way as we do the color in diff.c::git_diff_ui_config().



Re: [PATCH] config option core.showroot to enable showing the diff of the root commit

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:32:18

Peter Baumann [off-list ref]
writes:
quoted
quoted
I'm not sure if making core.showroot acting on git-diff-tree is the
right thing to do. Please check first bevore applying.
I agree that this "use --root by default" belongs to Porcelain
layer, not the plumbing.  We would probably want to do this in
the same way as we do the color in diff.c::git_diff_ui_config().
Sorry, but I don't understand. The color handling doesn't look any different
to me than the handling of the other config entrys. Did I miss something?
"git-diff-tree --color HEAD" (with explicit command line
instruction to color it) still colours its output, but "[diff]
color = auto" in ~/.gitconfig would not affect the coloring.
Hence, "git-diff-tree HEAD" with the configuration entry gives
monochrome.

"git diff HEAD" on the other hand looks at '[diff] color = auto"
and will color its output without being told on the command
line.


Re: [PATCH] config option core.showroot to enable showing the diff of the root commit

From: Peter Baumann <hidden>
Date: 2016-08-11 19:56:25

On 2006-11-23, Junio C Hamano [off-list ref] wrote:
Peter Baumann [off-list ref]
writes:
quoted
This allows one to see the root commit as a diff in commands like git-log,
git-show and git-whatchanged. It also modifies git-diff-tree to act as --root
was specified on the commandline. The default is set to true.

Signed-off-by: Peter Baumann <redacted>
---
I'm not sure if making core.showroot acting on git-diff-tree is the
right thing to do. Please check first bevore applying.
I agree that this "use --root by default" belongs to Porcelain
layer, not the plumbing.  We would probably want to do this in
the same way as we do the color in diff.c::git_diff_ui_config().
Sorry, but I don't understand. The color handling doesn't look any different
to me than the handling of the other config entrys. Did I miss something?

Peter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help