]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cook: Move temporaries one level down
authorJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2009 01:14:15 +0000 (18:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2009 01:14:15 +0000 (18:14 -0700)
cook.sh

diff --git a/cook.sh b/cook.sh
index 4d5864281e9dacd4d6a01ffa0c111f88b39b52e1..8cba79ca4d28bb367086cb9094d02277affb3113 100755 (executable)
--- a/cook.sh
+++ b/cook.sh
@@ -3,8 +3,10 @@
 LANG=C LC_ALL=C GIT_PAGER=cat
 export LANG LC_ALL GIT_PAGER
 
-tmp=/var/tmp/cook.$$
-trap 'rm -f "$tmp".*' 0
+tmpdir=/var/tmp/cook.$$
+mkdir "$tmpdir" || exit
+tmp="$tmpdir/t"
+trap 'rm -fr "$tmpdir"' 0
 
 git branch --merged "master" | sed -n -e 's/^..//' -e '/\//p' >"$tmp.in.master"
 git branch --merged "pu" | sed -n -e 's/^..//' -e '/\//p' >"$tmp.in.pu"
@@ -245,8 +247,22 @@ perl -w -e '
        my $incremental = $ARGV[1] eq "yes";
        my $last_empty = undef;
        my (@section, %section, @branch, %branch, %description, @leader);
+       my $in_unedited_olde = 0;
 
        while (<STDIN>) {
+               if ($in_unedited_olde) {
+                       if (/^>>$/) {
+                               $in_unedited_olde = 0;
+                               $_ = " | $_";
+                       }
+               } elsif (/^<<$/) {
+                       $in_unedited_olde = 1;
+               }
+
+               if ($in_unedited_olde) {
+                       $_ = " | $_";
+               }
+
                if (defined $section && /^-{20,}$/) {
                        $_ = "\n";
                }
@@ -296,6 +312,7 @@ perl -w -e '
                                push @section, $section;
                                $section{$section} = [];
                        }
+                       push @{$section{$section}}, $branch;
                        push @branch, [$branch, $section];
                        $branch{$branch} = (scalar @branch) - 1;
                        if (!exists $description{$branch}) {