From: Linus Torvalds <torvalds@osdl.org>
To: Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de>
Cc: git@vger.kernel.org
Subject: Re: git-show --stat on first commit
Date: Tue, 21 Nov 2006 08:31:30 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0611210820100.3338@woody.osdl.org> (raw)
In-Reply-To: <slrnem694k.4lm.Peter.B.Baumann@xp.machine.xx>
On Tue, 21 Nov 2006, Peter Baumann wrote:
>
> Why not make --root the default? I also stumbled over this behaviour and
> even asked on this list.
I suspect we should make the thing a config option, and default it to
"on".
I personally do _not_ want to see the root commit, because for the kernel,
it's a honking huge import that does not make sense as a "diff". It's not
really a diff against anything, after all - it's an import.
That's really the reason why git defaults to not showing the root diff at
all: exactly because for the kernel, the initial commit was state that
"just came to be", and I found it both illogical and annoying to see it as
a diff, since that commit really was a "black hole" where previous history
just disappeared.
But if you have the _full_ history with a new project, "--root" by default
probably makes tons of sense.
> And one less "wart" to clean, which another thread is all about. :-)
I really don't think it's a wart - see above - but it depends on the
project.
There's also another reason for the root being special, which is purely
git-internal: the root really has no parents at all, and the normal "git
diff" is "diff against parents". So from a purely implementation
standpoint, the "root" case is actually a special case, and for a while I
was kind of wondering whether I should do what a lot of other SCM's seem
to do, namely start out with an "empty root" when doing "git init-db".
git didn't end up doing that (and I'm personally pretty happy about it),
but it was one of the things I was kind of thinking about: a "git import"
kind of thing would have created an initial commit which was pre-populated
with the thing to import, and a "git init-db" would have created an
initial root commit that was empty.
That would have made the current "don't show the root diff" behaviour very
natural (and you'd still have gotten the initial diff for a new project),
but on the other hand, it would have had that annoying unnecessary "init"
commit, and you'd _still_ have wanted to have something like "--root" in
order to show the import commit as a patch (which you _sometimes_ want to
do).
So having a config option would solve the problem, but what annoys me
right now about the config options is that we really should have a
graphical front-end to setting those things or something, because while
_I_ don't have any issues with editing a ".git/config" file, I think we're
getting to the point where a lot of our problems are really about "you can
do it, but you have to know a lot about git to even know you can do it".
next prev parent reply other threads:[~2006-11-21 16:36 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 13:41 git-show --stat on first commit Andy Parkins
2006-11-21 14:01 ` Jakub Narebski
2006-11-21 14:09 ` Santi Béjar
2006-11-21 16:08 ` Peter Baumann
2006-11-21 16:18 ` Jakub Narebski
2006-11-21 17:16 ` Peter Baumann
2006-11-21 18:14 ` Horst H. von Brand
2006-11-21 16:31 ` Linus Torvalds [this message]
2006-11-21 16:47 ` Shawn Pearce
2006-11-21 17:11 ` Peter Baumann
2006-11-21 17:20 ` Linus Torvalds
2006-11-21 18:38 ` Olivier Galibert
2006-11-21 18:42 ` Shawn Pearce
2006-11-21 19:05 ` Petr Baudis
2006-11-21 18:06 ` Petr Baudis
2006-11-21 18:16 ` Jakub Narebski
2006-11-21 18:21 ` Petr Baudis
2006-11-21 18:34 ` Shawn Pearce
2006-11-21 18:39 ` Andy Parkins
2006-11-21 18:48 ` Petr Baudis
2006-11-21 18:52 ` Shawn Pearce
2006-11-21 19:04 ` Petr Baudis
2006-11-21 19:31 ` Junio C Hamano
2006-11-21 20:03 ` Jakub Narebski
2006-11-23 9:25 ` Andy Parkins
2006-11-24 7:49 ` Jakub Narebski
2006-11-23 9:36 ` [PATCH] config option core.showroot to enable showing the diff of the root commit Peter Baumann
2006-11-23 20:52 ` Junio C Hamano
2006-11-23 23:34 ` Peter Baumann
2006-11-24 0:18 ` Junio C Hamano
2006-11-24 1:30 ` Junio C Hamano
2006-11-24 7:53 ` Peter Baumann
2006-11-24 8:54 ` Junio C Hamano
2006-11-24 9:04 ` Peter Baumann
2006-11-21 18:39 ` git-show --stat on first commit Carl Worth
2006-11-21 19:15 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0611210820100.3338@woody.osdl.org \
--to=torvalds@osdl.org \
--cc=Peter.B.Baumann@stud.informatik.uni-erlangen.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).