Re: git-show --stat on first commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 21, 2006 at 07:16:44PM CET, Jakub Narebski wrote:
> Petr Baudis wrote:
> 
> > On Tue, Nov 21, 2006 at 05:31:30PM CET, Linus Torvalds wrote:
> >> 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."
		-- Kurt Vonnegut, Sirens from Titan
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]