]> de.git.xonotic.org Git - xonotic/div0-gittools.git/blobdiff - git-branch-manager
remove some warning mess
[xonotic/div0-gittools.git] / git-branch-manager
index 5e771ccd4e420740519e0e735122dc5709af0a78..a43225da023dc7b55f1ef25320f7f36cfb22abac 100755 (executable)
@@ -137,7 +137,7 @@ sub reject_commit($)
                }
                open my $fh, '>', '.commitmsg'
                        or die ">.commitmsg: $!";
-               print $fh "REJECT\n$cmsg" . "::stable-branch::reject=$r\n"
+               print $fh "REJECT$cmsg" . "::stable-branch::reject=$r\n"
                        or die ">.commitmsg: $!";
                close $fh
                        or die ">.commitmsg: $!";
@@ -183,7 +183,7 @@ sub unreject_commit($)
                }
                open my $fh, '>', '.commitmsg'
                        or die ">.commitmsg: $!";
-               print $fh "UNREJECT\n$cmsg" . "::stable-branch::unreject=$r\n"
+               print $fh "UNREJECT$cmsg" . "::stable-branch::unreject=$r\n"
                        or die ">.commitmsg: $!";
                close $fh
                        or die ">.commitmsg: $!";
@@ -281,7 +281,7 @@ sub unmerge_commit($)
                }
                open my $fh, '>', '.commitmsg'
                        or die ">.commitmsg: $!";
-               print $fh "UNMERGE\n$cmsg" . "::stable-branch::unmerge=$r\n"
+               print $fh "UNMERGE$cmsg" . "::stable-branch::unmerge=$r\n"
                        or die ">.commitmsg: $!";
                close $fh
                        or die ">.commitmsg: $!";
@@ -416,27 +416,33 @@ sub parse_log()
                my $data = $logmsg{$_};
                if($data =~ /::stable-branch::unmerge=(\S+)/)
                {
+                       next if not defined $history{$1};
                        push @logdata, ['unmerge', $1];
                }
                elsif($data =~ /::stable-branch::merge=(\S+)/)
                {
+                       next if not defined $history{$1};
                        push @logdata, ['merge', $1];
                }
                elsif($data =~ /::stable-branch::reject=(\S+)/)
                {
+                       next if not defined $history{$1};
                        push @logdata, ['reject', $1];
                }
                elsif($data =~ /::stable-branch::unreject=(\S+)/)
                {
+                       next if not defined $history{$1};
                        push @logdata, ['unreject', $1];
                }
                elsif($data =~ /::stable-branch::reset=(\S+)/)
                {
+                       next if not defined $history{$1};
                        @logdata = ();
                        $base = $1;
                }
                elsif($data =~ /::stable-branch::rebase=(\S+)/)
                {
+                       next if not defined $history{$1};
                        $lastrebase->[0] = 'ignore'
                                if defined $lastrebase;
                        push @logdata, ($lastrebase = ['rebase', $1]);