Documentation / howto / make-dist.txton commit Merge with gitk (379955c)
   1Date:   Fri, 12 Aug 2005 22:39:48 -0700 (PDT)
   2From: Linus Torvalds <torvalds@osdl.org>
   3To: Dave Jones <davej@redhat.com>
   4cc: git@vger.kernel.org
   5Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
   6
   7On 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
  16Well, git-tar-tree has been there since late April - it's actually one of
  17those really early commands. I'm pretty sure the RSS feed came later ;)
  18
  19I use it all the time in doing releases, it's a lot faster than creating a
  20tar tree by reading the filesystem (even if you don't have to check things
  21out). A hidden pearl.
  22
  23This 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
  37and when I want to do a new kernel release I literally first tag it, and
  38then do
  39
  40        release-script 2.6.12 2.6.13-rc6 2.6.13-rc7
  41
  42and check that things look sane, and then just cut-and-paste the commands.
  43
  44Yeah, it's stupid.
  45
  46                Linus
  47