From: Linus Torvalds <torvalds@osdl.org>
To: Wolfgang Denk <wd@denx.de>
Cc: Andreas Ericsson <ae@op5.se>, Petr Baudis <pasky@suse.cz>,
git@vger.kernel.org
Subject: Re: cg-commit does not run pre-commit hook?
Date: Thu, 12 Oct 2006 10:20:57 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610121011110.3952@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610120957460.3952@g5.osdl.org>
On Thu, 12 Oct 2006, Linus Torvalds wrote:
>
> Why? That's just stupid.
Btw, let me explain that strong statement, because it _is_ a strong
statement, but it's true.
The problem with trying to generate a changelog entry at commit time is
that it is fundamentally a broken concept in a distributed environment.
What happens at a merge event? Sure, you can have special merge magic to
try to sort out the mess, but it _is_ a mess. You can make things "work",
but you can never actually make the result really make _sense_. The
changelog is fundamentally a serialization of something that wasn't
serial.
Now, the same serialization problem obviously exists when you
auto-generate the changelog file when doing a release tar-ball or
something like that, but at that point you basically "fix" it in time, so
at that point the changelog actually makes sense.
It also turns out that in many situations, you can sort the result in
other ways: the shortlog format, for example, is often superior to the
default "git log" ordering, just because sorting things by person tends to
actually result in a better view of what changed (it tells you something
new: clumping by author not onyl tends to clump similar commits together
and thus tell more of a "story", but it also has the added advantage of
telling people who does what).
Generating things after-the-fact would also allow ordering things by what
files (or subdirectories) they touch, although we've never done such a
script. I do that quite often privately by just restricting the log to
certain subsystems, though, and it's a damn useful thing to have. I would
not be surprised at all if it might make sense to actually do a "tar-ball"
changelog that way for certain projects - especially if they have clearly
separated sub-components.
[ Btw, this whole "do things by pathname" has been so successful, that
I've come to realize that I would probably never accept an SCM that
doesn't allow something like that. Being able to do
gitk some/random/set of/directories and/files
is just _incredibly_ useful. Maybe others don't do it as much as I do,
but as a top-level maintainer, being able to look at history from the
viewpoint of just a random subset of the tree is incredibly powerful.
I very strongly suspect that doing logs that way is often a good idea
too. ]
Linus
next prev parent reply other threads:[~2006-10-12 17:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 20:30 cg-commit does not run pre-commit hook? Wolfgang Denk
2006-10-12 1:15 ` Petr Baudis
2006-10-12 14:27 ` Wolfgang Denk
2006-10-12 14:42 ` Andreas Ericsson
2006-10-12 15:54 ` Wolfgang Denk
2006-10-12 16:59 ` Linus Torvalds
2006-10-12 17:20 ` Linus Torvalds [this message]
2006-10-12 17:02 ` Josef Weidendorfer
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.0610121011110.3952@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
--cc=wd@denx.de \
/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).