Re: [PATCH] config option core.showroot to enable showing the diff of the root commit
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 24, 2006, 00:18 UTC
- Message-ID
- <7vejrthf2y.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <slrnemcc0b.ncc.Peter.B.Baumann@xp.machine.xx>
Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de> writes:
Show 9 quoted lines
>>> 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.