Thread (22 messages) flat view 22 messages, 9 authors, 2016-08-11

Re: git-show --stat on first commit

From: Petr Baudis <hidden>
Date: 2016-08-11 19:23:36

On Tue, Nov 21, 2006 at 07:16:44PM CET, Jakub Narebski wrote:
Petr Baudis wrote:
quoted
On Tue, Nov 21, 2006 at 05:31:30PM CET, Linus Torvalds wrote:
quoted
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).
It's being asked by users time by time (first in April last year ;) and
I'm not sure about any good answer I should tell them, so is the reason
for not doing the implicit empty commit that it would be "annoying" I
suppose in the log output?
git repo-config show.difftree --root
git repo-config whatchanged.difftree --root
That means extra pointless setup and is besides the point anyway, I was
asking about empty commits, not default command settings.

BTW, the other frequent reason why empty commits come up so frequently
is a FAQ "how do I create an unrelated branch in my repository" - their
idea is that they will create a new branch starting with an empty commit
(of course noone would think of anything like that in inferior VCSes
because replacing the checked out trees would took forever; how cool Git
is!).

(The answer is usually "create the branch in a separate repo and then
fetch it to the original one". But it feels a bit kludgy given the
otherwise seamless support for unrelated branches. (Not that I ever was
a big fan of unrelated long-lived branches in general.))

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
The meaning of Stonehenge in Traflamadorian, when viewed from above, is:
"Replacement part being rushed with all possible speed."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help