]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/howto/make-dist.txt
Merge from gitk
[thirdparty/git.git] / Documentation / howto / make-dist.txt
1 Date: Fri, 12 Aug 2005 22:39:48 -0700 (PDT)
2 From: Linus Torvalds <torvalds@osdl.org>
3 To: Dave Jones <davej@redhat.com>
4 cc: git@vger.kernel.org
5 Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
6
7 On Sat, 13 Aug 2005, Dave Jones wrote:
8 >
9 > > Git actually has a _lot_ of nifty tools. I didn't realize that people
10 > > didn't know about such basic stuff as "git-tar-tree" and "git-ls-files".
11 >
12 > Maybe its because things are moving so fast :) Or maybe I just wasn't
13 > paying attention on that day. (I even read the git changes via RSS,
14 > so I should have no excuse).
15
16 Well, git-tar-tree has been there since late April - it's actually one of
17 those really early commands. I'm pretty sure the RSS feed came later ;)
18
19 I use it all the time in doing releases, it's a lot faster than creating a
20 tar tree by reading the filesystem (even if you don't have to check things
21 out). A hidden pearl.
22
23 This is my crappy "release-script":
24
25 [torvalds@g5 ~]$ cat bin/release-script
26 #!/bin/sh
27 stable="$1"
28 last="$2"
29 new="$3"
30 echo "# git-tag-script v$new"
31 echo "git-tar-tree v$new linux-$new | gzip -9 > ../linux-$new.tar.gz"
32 echo "git-diff-tree -p v$stable v$new | gzip -9 > ../patch-$new.gz"
33 echo "git-rev-list --pretty v$new ^v$last > ../ChangeLog-$new"
34 echo "git-rev-list --pretty=short v$new ^v$last | git-shortlog > ../ShortLog"
35 echo "git-diff-tree -p v$last v$new | git-apply --stat > ../diffstat-$new"
36
37 and when I want to do a new kernel release I literally first tag it, and
38 then do
39
40 release-script 2.6.12 2.6.13-rc6 2.6.13-rc7
41
42 and check that things look sane, and then just cut-and-paste the commands.
43
44 Yeah, it's stupid.
45
46 Linus
47